Enumerated compatibility is stricter in TITAN than in TTCN-3 standard
Summary
Enumerated compatibility needs identical enumerated types to work in TITAN, while the standard (6.3.2.1) is more relaxed on this matter.
Steps and/or TTCN-3 code to reproduce
type enumerated EWeekDays {
Mon, Tue, Wed, Thu, Fri, Sat, Sun
};
type enumerated EWorkDays {
Mon, Tue, Wed, Thu, Fri
};
type enumerated EComplexValues {
e_num (1),
e_expr (2+2),
e_bin_conv (bit2int('0111'B)),
e_oct_conv (oct2int('34'O)),
e_hex_conv (hex2int('AC'H))
}
type enumerated ESimpleValues {
e_num (1),
e_expr (4),
e_bin_conv (7),
e_oct_conv (52),
e_hex_conv (172)
}
testcase enum_comp() runs on ct_empty{
var EWeekDays v_myWeekDayMon := Mon
var EWorkDays v_myWorkDayMon := Mon
var EComplexValues v_myComplexValuedEnum := e_bin_conv;
var ESimpleValues v_mySimpleValuedEnum := e_bin_conv;
v_myWorkDayMon := v_myWeekDayMon
v_mySimpleValuedEnum := v_myComplexValuedEnum;
}
What is the current bug behavior?
Errors
What is the expected correct behavior?
The two last assignments shall work as the assigned value exists in the domain of the assignee and its identifier is the same too.
Relevant logs and/or screenshots
../src/datatypes.ttcn:509.21-34: error: Type mismatch: a value of type `@datatypes.EWorkDays' was expected instead of `@datatypes.EWeekDays'
../src/datatypes.ttcn:510.27-47: error: Type mismatch: a value of type `@datatypes.ESimpleValues' was expected instead of `@datatypes.EComplexValues'
Possible fixes
Titan version
8.1.0
Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyari