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

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.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
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/Resolver.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
index 836e1d0865812b550227d7ef37a0d2a6e787811f..557470e14b9427548b7c16d0a24faa3d629ce706 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
@@ -1342,4 +1342,20 @@ public class NegativeResolverTest extends CompilerTestCase {
"}"),
errEx(ResolverErrorCode.CANNOT_RESOLVE_METHOD_IN_CLASS, 4, 5, 6));
}
+
+ /**
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=4090
+ */
+ public void test_forEachVaraibleIsNotVisibleInIterableExpression() throws Exception {
Brian Wilkerson 2012/07/28 14:48:47 minor typo: "Varaible" --> "Variable"
+ checkSourceErrors(
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "List foo(var a) {}",
+ "main() {",
+ " for (var y in foo(y)) {",
+ " }",
+ "}"),
+ errEx(ResolverErrorCode.CANNOT_BE_RESOLVED, 4, 21, 1));
+ }
}
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/Resolver.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698