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
The following code snippet does not result in a validation error, even though it should:
PROGRAM FOO
VAR
x : DINT;
s : STRING;
END_VAR
s := 'Hello, world!';
x := s;
END_PROGRAM
We already have validations in place for invalid assignments, but as far as i can tell this validation only happens for either call parameters of when trying to assign characters. We should extend the validation to also cover other possibilities, otherwise the attempted codegen will result in a panic.
The text was updated successfully, but these errors were encountered:
riederm
changed the title
Missing invalid assigment validation
Validation of invalid assigment (Type-Incompatibility - e.g. assign STRING to DINT)
Feb 14, 2023
The following code snippet does not result in a validation error, even though it should:
We already have validations in place for invalid assignments, but as far as i can tell this validation only happens for either call parameters of when trying to assign characters. We should extend the validation to also cover other possibilities, otherwise the attempted codegen will result in a panic.
The text was updated successfully, but these errors were encountered: