Closed
Description
Is your feature request related to a problem? Please describe.
Currently we are not validating the amount of passed parameters to function calls. Calls with too many/too few parameters will fail with an error during codegen. Example:
FUNCTION foo : DINT
VAR_INPUT
x1 : DINT;
x2 : REAL;
END_VAR
END_FUNCTION
FUNCTION main : DINT
VAR
x1 : DINT;
x2 : REAL;
END_VAR
foo(x1);
foo(x1, x2, x1, x2);
END_FUNCTION
Describe the solution you'd like
We should add a validation to check for invalid param count.