Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initialization error not visible #1194

Open
rarris opened this issue Apr 9, 2024 · 1 comment
Open

initialization error not visible #1194

rarris opened this issue Apr 9, 2024 · 1 comment
Labels
bug Something isn't working medium-priority

Comments

@rarris
Copy link
Contributor

rarris commented Apr 9, 2024

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 rarris added the bug Something isn't working label Apr 9, 2024
@volsa
Copy link
Member

volsa commented Apr 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working medium-priority
Projects
None yet
Development

No branches or pull requests

3 participants