port type variables and constants are not allowed in Titan
Summary
According to section 6.2.9 of the TTCN-3 standard, port type parameters, variables and constants can be defined. TITAN does not allow this, however.
Steps and/or TTCN-3 code to reproduce
type port mypt message{
inout integer;
}with{extension "internal";}
type component myct2{
port mypt p;
}
type component cct{
port mypt p;
port mypt q;
}
function f_sender(mypt sp) runs on cct{
sp.send(1);
sp.receive;
setverdict(pass);
}
testcase const_port() runs on cct{
connect(self:p, self:p);
connect(self:q, self:q);
const mypt cp := p;
var mypt vp := cp;
const mypt cq := q;
var mypt vq := cq;
f_sender(p);
f_sender(q);
}
What is the current bug behavior?
Compile error
What is the expected correct behavior?
Pass after execution
Relevant logs and/or screenshots
../src/control_flow.ttcn:139.15-21: error: Constant cannot be defined for port type `@control_flow.mypt2'
../src/control_flow.ttcn:140.13-20: error: Variable cannot be defined for port type `@control_flow.mypt2'
Possible fixes
Titan version
8.1.0
Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyari
Edited by Levente Erős