Subfield of actual inout parameter value can be used as another actual inout parameter
Summary
According to section 5.4.2, paragraph m of the TTCN-3 standard, a subfield (or element) of an inout parameter cannot be used as another inout parameter in the same function call. But TITAN allows this.
Steps and/or TTCN-3 code to reproduce
Create a module with
type component ct_empty{}
type record myrt{
integer field1,
integer field2
}
function fn_no_subfield_as_inout(inout myrt r, inout integer i){
i := 3;
r := {4,4};
}
testcase tc_no_subfield_as_inout() runs on ct_empty{
var myrt ri := {1,2}
fn_no_subfield_as_inout(ri, ri.field1);
log(ri);
setverdict(pass);
}
Then compile and build
What is the current bug behavior?
It runs and the inout record type parameter gets value {4,4}
What is the expected correct behavior?
compilation error
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