Semantic analyzer: false error message on encvalue(x,"","JSON") where x is BIT STRING
Submitted by Jeno Attila Balasko
Assigned to Arpad Lovassy
Link to original bug (#560028)
Description
Created attachment 281780 JsonBasicASN1EncDecTest1.ttcn
If there is an asn1 type definition:
Asn1-bs ::= BIT STRING
and it is used in a ttcn module:
testcase tc_asn1_bs2bs_bug() runs on CT {
var Asn1_bs x := '01'B, d;
var bitstring encoded2 := encvalue(x, "", "JSON");
var bitstring expected := '0010 0010 00110000 00110001 0010 0010'B;// "01"
f_compare_bitstring(encoded2,expected);
}
type component CT {}
then the line with encode()
is marked with this semantic error marker:
No coding rule specified for type `bitstring' JsonBasicASN1EncDecTest1.ttcn /TR_2019_12_ttcn2cpp/src line 73 on-the-fly semantic markers
Remark: The code can be compiled for cpp and run with success. Code attached.
Attachment 281780, "JsonBasicASN1EncDecTest1.ttcn":
JsonBasicASN1EncDecTest1.ttcn
Version: 6.6.1