[CR] Standard change regarding parameters of functions with runs on clause
Summary
TTCN-3 standard changed (5.4.1.1 Formal parameters of kind value, Restrictions section)
v4.3.1: "e) The expression of the default value has to be compatible with the type of the parameter. The expression shall not refer to elements of the component type of the optional runs on clause. The expression shall not refer to other parameters of the same parameter list. The expression shall not contain the invocation of functions with a runs on clause."
vs
v4.13.1: "e) The expression of formal parameter's default value has to be compatible with the type of the parameter. The expression may be any expression that is well-defined at the beginning of the scope of the parameterized entity, but shall not refer to other parameters of the same parameter list."
Steps and/or TTCN-3 code to reproduce
function f_myFunction( in integer p_par := vc_componentVariable) runs on CompType return Integer {}
type component CompType {
var integer vc_componentVariable := 0;
}
What is the current bug behavior?
The compiler reports error to the example code above:
Error: default value cannot refer to a template field of the component in the `runs on' clause
What is the expected correct behavior?
The compiler should accept the code
Titan version
8.1.1
Platform details (OS type and version)
Any
/cc @aknappqwt