| Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| index 69a6f9d919883c02ad4c2051cabb372233e36bcc..669891965d3c508c065823e12edb95ab8a0be25d 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| @@ -4279,6 +4279,26 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| assertErrors(libraryResult.getErrors());
|
| }
|
|
|
| + /**
|
| + * <p>
|
| + * http://code.google.com/p/dart/issues/detail?id=4900
|
| + */
|
| + public void test_forInLoop_fieldAsVariable() throws Exception {
|
| + AnalyzeLibraryResult result = analyzeLibrary(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "var v;",
|
| + "get l => v;",
|
| + "set l(x) {v = x;}",
|
| + "main() {",
|
| + " for (l in [1, 2, 3]) {",
|
| + " process(l);",
|
| + " }",
|
| + "}",
|
| + "process(x) {}",
|
| + "");
|
| + assertErrors(result.getErrors());
|
| + }
|
| +
|
| private <T extends DartNode> T findNode(final Class<T> clazz, String pattern) {
|
| final int index = testSource.indexOf(pattern);
|
| assertTrue(index != -1);
|
|
|