Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Unified Diff: compiler/java/com/google/dart/compiler/resolver/Resolver.java

Issue 10826055: Issue 4090. For-in loop variable should not be visible in iterable expression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: compiler/java/com/google/dart/compiler/resolver/Resolver.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
index c0dce421c65c989f9a2d3444f2deec9293ab2b65..674fdc199488ede76e933039851c25bff57b1a56 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -910,12 +910,12 @@ public class Resolver {
getContext().pushScope("<for in>");
addLabelToStatement(x);
+ x.getIterable().accept(this);
if (x.introducesVariable()) {
resolveVariableStatement(x.getVariableStatement(), true);
} else {
x.getIdentifier().accept(this);
}
- x.getIterable().accept(this);
x.getBody().accept(this);
getContext().popScope();
return null;

Powered by Google App Engine
This is Rietveld 408576698