-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Labels
validationcandidate for syntactic or semantic validationcandidate for syntactic or semantic validation
Description
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)
Metadata
Metadata
Assignees
Labels
validationcandidate for syntactic or semantic validationcandidate for syntactic or semantic validation