-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Compiler assertion error when assigning variable using error #3823
Comments
Investigating I found that the error occurs when |
Thanks for looking into it! I think we should add to that line you linked so that we not only return false, but also add a compilation error like this: ast_error(opt->check.errors, ast,
"right side must be something that can be assigned"); |
Should this be made into its own issue? The original error existed for other non-assignable expressions such as |
This function body causes an assertion error in the compiler (version 0.42.0 in this case but I also see it in a slightly modified version of 0.45.0). I couldn't find another issue for this yet but it's not easy to search for.
Found this on a hunch/check while looking at the error-flag code, hoping to fix with possible other changes
This results in:
In addition, there seems to be a parse error if
(error)
is replaced byerror
,as in
let x: String = error
The text was updated successfully, but these errors were encountered: