Anytype not working with custom types
Summary
A data type that is defined custom in one module and an imported module or in two imported modules, shall not be reachable through the anytype of the importing module. However if a custom type is only defined in one imported module, then it should be reachable through the anytype of the importing module.
Titan however works the following way: A custom type is only reachable through anytype if it is defined in the module of reference
Steps and/or TTCN-3 code to reproduce
Create module with contents:
module datatypes {
import from datatypes_clashing all;
type component ct_empty{}
type integer I;
testcase anytype_clashing() runs on ct_empty{
var anytype vi;
vi.I := 1; //should lead to error but does not
}
}with{extension "anytype integer, float, I"}
Create this other module as well:
module datatypes_clashing {
type float I;
}with{extension "anytype float, I"}
Build.
What is the current bug behavior?
No error is produced.
What is the expected correct behavior?
The value assignment vi.I:=1;
should lead to an error as I is both defined locally and in an imported module, which means a clash. However, Titan does not take into consideration the imported type definition, only the local.
Relevant logs and/or screenshots
Possible fixes
Titan version
8.1.0
Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyari