Commit 82b5655
committed
Special prop assignment symbol applies only to lhs
In a Javascript file, the binder assigns a SpecialPropertyAssignment
marker to the BinaryExpression node of several kinds of special
assignments. Then it binds a special symbol whose declaration is that
BinaryExpression node. But the symbol only applies to the left-hand side
of the assignment. The right-hand side is an independent expression that
should have its own symbols.
Previously, symbol lookup in the checker didn't check whether a
Javascript node that was part of a special property assignment came from
the lhs or the rhs. So the right-hand side would also incorrectly get
the special symbol intended for the left-hand side.
`getSpecialPropertyAssignmentSymbolFromEntityName` in the checker now
checks that its argument is the left-hand side of an assignment before
returning a special property assignment symbol.1 parent 2d4b4c9 commit 82b5655
2 files changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20898 | 20898 | | |
20899 | 20899 | | |
20900 | 20900 | | |
20901 | | - | |
| 20901 | + | |
| 20902 | + | |
| 20903 | + | |
20902 | 20904 | | |
20903 | 20905 | | |
20904 | 20906 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments