rusty
rusty copied to clipboard
initialization error not visible
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
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.