-
-
Couldn't load subscription status.
- Fork 702
Closed
Labels
Description
Consider the following code snippets:
let a = 1; b;
b = a++;
// ...
let a = 1, b;
b = (0, ++a);After semantic analysis in both cases, a will be considered to have a single reference of type ReferenceFlags::Write. In fact, since ReferenceFlags is an enum, it's impossible for a symbol reference to be both a read and a write.
-
ReferenceFlagsshould be a bitflag - When encountering an
IdentifierReference,SemanticBuildershould walk up the AST on certain nodes (e.g.UpdateExpressions) and check for further reads/writes