initialization of @lazy and @fuzzy variables can be done by functions having inout and out parameters
Summary
The condition in the title is not allowed according to Restriction e) in Section 11.1 of the TTCN-3 standard. Titan however, allows this.
Steps and/or TTCN-3 code to reproduce
function noinoutps() return integer{
var integer i:=2;
var integer j;
inoutps(i,j);
return 2;
}
function inoutps(inout integer i, out integer j) return integer{
j:=i;
i:=3;
return 3;
}
testcase fuzzy_lazy_ass() runs on ct_empty{
var integer i:=2;
var integer j;
var @lazy integer lv;
@try{
lv := inoutps(i,j);
}@catch(msg){
setverdict(pass);
}
var @lazy integer lv2 := noinoutps();
i:=2;
var @fuzzy integer fv;
@try{
fv := inoutps(i,j);
}@catch(msg){
setverdict(pass);
}
var @fuzzy integer fv2 := noinoutps();
}
What is the current bug behavior?
The testcase has a none verdict.
What is the expected correct behavior?
The testcase shall have a pass verdict (due to the problematic initializations -- with inoutps running into an error). That is, using inoutps(i,j)
for initializing variables lv and fv shall cause an 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 @mmagyari