You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We're missing a validation for invalid assignment statements in arguments (:=, =>), specifically the following should return an error
FUNCTION_BLOCK foo
VAR_OUTPUT
out_val : DINT;
END_VAR
END_FUNCTION_BLOCK
FUNCTION main
VAR
foo_instance : foo;
out_val_local : DINT;
END_VAR
foo_instance(out_val := out_val_local);
// ^^ should have been a `=>`
END_FUNCTION
With #1214 this will silently generate invalid code. For reference, CodeSys will return a "'out_val' is no input of foo" error here.
(I think the same should also happen for INPUT values, i.e. where a user typed => instead of :=, but CodeSys doesn't return an error for this)
The text was updated successfully, but these errors were encountered:
Describe the bug
We're missing a validation for invalid assignment statements in arguments (
:=
,=>
), specifically the following should return an errorWith #1214 this will silently generate invalid code. For reference, CodeSys will return a "'out_val' is no input of foo" error here.
(I think the same should also happen for INPUT values, i.e. where a user typed
=>
instead of:=
, but CodeSys doesn't return an error for this)The text was updated successfully, but these errors were encountered: