Chromium Code Reviews
DescriptionDetect illegal assignable expressions
The AST cannot distinguish between (x) and x. Adding a check
to the VM compiler that detects syntactically illegal assignments
like (x) = 0. The existing checks only analyze the AST so we
didn’t detect some illegal cases.
Looking at the source to detect syntactically illegal left hand
expressions is a bit ugly because we can’t easily look at
previous tokens. This change rewinds the token iterator a few
positions and then moves forward to check whether the last token
of the expression is an identifier or a closing bracket ].
Added new test. We did not have a single test case for this :)
R=regis@google.com
Committed: https://code.google.com/p/dart/source/detail?r=30904
Patch Set 1 #
Messages
Total messages: 3 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||