Set of compatibility is too restrictive in Titan
Summary
Set of compatibility should not require type match of set of type, according to Section 6.3.2.3 of the TTCN standard.
Steps and/or TTCN-3 code to reproduce
type record AType {
integer a(0..10) optional,
integer b(0..10) optional,
boolean c
}
type set FType {
integer a optional,
integer b optional,
boolean c
}
type set GType {
integer d optional,
integer e optional,
boolean f
}
testcase set_setof_comp() runs on ct_empty{
var AType v_myVarA := { -, 1, true};
var FType v_myVarF := { a:=1, c:=true };
var GType v_myVarG := { f:=true, d:=7};
v_myVarF := v_myVarG;
//v_myVarF := v_myVarA; error
setverdict(pass);
}
What is the current bug behavior?
Error. See log.
What is the expected correct behavior?
Assignment v_myVarF := v_myVarG;
is legal, as the fields are compatible.
Relevant logs and/or screenshots
../src/datatypes.ttcn:610.15-22: error: Type mismatch: a value of type `@datatypes.FType' was expected instead of `@datatypes.GType'
Possible fixes
Titan version
8.1.0
Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyari