ttcn2java Wrong generated code if in ASN1 hexadec value assigned to var with type of ANY
Submitted by Jeno Attila Balasko
Assigned to Jeno Attila Balasko
Link to original bug (#559789)
Description
Created attachment 281686 Example asn file
In an ASN.1 file, if the hexadecimal value is assigned to a value of type ANY, then the ttcn2java code generator created an erroneous code or a semantically correct code which will cause runtime error Examples have been attached.
For example: x ANY ::= 'ABBA'H --erroneous java code
or
Object1 ::= SEQUENCE { id OBJECT IDENTIFIER, data ANY }
c-obj Object1 ::= { id { joint-iso-itu-t remote-operations(4) informationObjects(5) version1(0) }, data 'DEADBEEF'H --runtime error }
Remark: Similar test can be created if the right hand value is a bitstring.
Attachment 281686, "Example asn file":
AsnAnyWithHexBug.asn
Version: 6.6.1