C error when assigning to an invalid assignment target #22321
Labels
Bug
This tag is applied to issues which reports bugs.
Unit: Checker
Bugs/feature requests, that are related to the type checker.
V doctor:
What did you do?
./v -g -o vdbg cmd/v && ./vdbg bug.v
What did you expect to see?
Syntax error.
What did you see instead?
Relevant C code:
The Crafting Interpreters book mentions a similar issue in §21.4 (the expression parser should only consume
=
if it's in a context of a low-precedence expression): https://craftinginterpreters.com/global-variables.html#assignmentNote
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: