Titanium searching for port and component instances in the wrong scope
Summary
Component and port references are searched for on module level.
Steps and/or TTCN-3 code to reproduce
module connections {
type integer myint;
type port pt1 message{
inout integer
}with{extension "internal"}
type port pt2 message{
inout myint
}with{extension "internal"}
type component parent{
port pt1 P1;
port pt2 P2;
}
function receiver() runs on parent{
P2.receive;
}
testcase tc_pt_compatibility() runs on parent{
var parent ptc := parent.create;
connect(mtc:P1, ptc:P2);
ptc.start(receiver());
P1.send(1);
}
}
What is the current bug behavior?
The ptc.start(receiver()); line gets an error saying there is no definition named ptc
P1.send(1); gets an error saying there is no definition named ptc
However, the code compiles and runs.
What is the expected correct behavior?
Neither of these should be problems as ptc is defined on testcase level, while P1 in the scope of the component that the testcase runs on.
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