Index: src/parser.cc |
diff --git a/src/parser.cc b/src/parser.cc |
index fd0dd2913eacd62897b64fa7af4b54461a773bdb..d5893fdcdac87b6b4304c60a5ada9788d1734e6c 100644 |
--- a/src/parser.cc |
+++ b/src/parser.cc |
@@ -452,11 +452,10 @@ void ParserTraits::CheckPossibleEvalCall(Expression* expression, |
} |
-Expression* ParserTraits::MarkExpressionAsLValue(Expression* expression) { |
- VariableProxy* proxy = expression != NULL |
- ? expression->AsVariableProxy() |
- : NULL; |
- if (proxy != NULL) proxy->MarkAsLValue(); |
+Expression* ParserTraits::MarkExpressionAsAssigned(Expression* expression) { |
+ VariableProxy* proxy = |
+ expression != NULL ? expression->AsVariableProxy() : NULL; |
+ if (proxy != NULL) proxy->set_is_assigned(); |
return expression; |
} |
@@ -1715,6 +1714,8 @@ void Parser::Declare(Declaration* declaration, bool resolve, bool* ok) { |
Expression* expression = NewThrowTypeError( |
"var_redeclaration", name, declaration->position()); |
declaration_scope->SetIllegalRedeclaration(expression); |
+ } else if (mode == VAR) { |
+ var->set_maybe_assigned(); |
} |
} |