Index: src/compiler/ast-loop-assignment-analyzer.cc |
diff --git a/src/compiler/ast-loop-assignment-analyzer.cc b/src/compiler/ast-loop-assignment-analyzer.cc |
index b1b666a728a276ab1fbe37d62fdcfc59b333a15a..82eaeb28a46840d5087c1b0baf1ea754282641bb 100644 |
--- a/src/compiler/ast-loop-assignment-analyzer.cc |
+++ b/src/compiler/ast-loop-assignment-analyzer.cc |
@@ -252,10 +252,12 @@ void ALAA::VisitForStatement(ForStatement* loop) { |
void ALAA::VisitForInStatement(ForInStatement* loop) { |
+ Expression* l = loop->each(); |
Enter(loop); |
- Visit(loop->each()); |
+ Visit(l); |
Visit(loop->subject()); |
Visit(loop->body()); |
+ if (l->IsVariableProxy()) AnalyzeAssignment(l->AsVariableProxy()->var()); |
Exit(loop); |
} |