rusty icon indicating copy to clipboard operation
rusty copied to clipboard

initialization error not visible

Open rarris opened this issue 1 year ago • 1 comments

if we have a error by initialization, this is not shown at all - line 4 the initialization error should be first listed

PROGRAM mainProg
VAR
x1,x2 : INT;
ton1 : TOFF;
END_VAR
x1 := 'cc';
END_PROGRAM
_________
error[E037]: Invalid assignment: cannot assign 'STRING' to 'INT'
Compilation aborted due to critical errors

2nd problem hier if we comment or delete "x1 := 'cc';", so that the initialization error be visible, the error is a codegen error and the link in the console is not listed

rarris avatar Apr 09 '24 08:04 rarris

To add some context, the "Unknown type: TOFF" error pops up in codegen, but the invalid assignment prevents us from entering codegen in the first place. We should probably detect errors like these in the validation stage rather than in codegen.

volsa avatar Apr 11 '24 09:04 volsa