| Index: editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java
|
| diff --git a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java
|
| index 51a7efb6b6a2038924a7b35e5eaaebcc29899b3b..f437fdbaa0b16cd6091962d75da433c52dd4366c 100644
|
| --- a/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java
|
| +++ b/editor/util/plugins/com.google.dart.java2dart_test/src/com/google/dart/java2dart/SemanticTest.java
|
| @@ -888,6 +888,39 @@ public class SemanticTest extends AbstractSemanticTest {
|
| "}"), getFormattedSource(unit));
|
| }
|
|
|
| + public void test_forbiddenNames_forEach() throws Exception {
|
| + File file = setFileLines(
|
| + "test/Test.java",
|
| + toString(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "package test;",
|
| + "public class Test {",
|
| + " static void main(String [] vars) {",
|
| + " for (String var: vars) {",
|
| + " print(var);",
|
| + " }",
|
| + " }",
|
| + " static void print(String p) {}",
|
| + "}",
|
| + ""));
|
| + Context context = new Context();
|
| + context.addSourceFolder(tmpFolder);
|
| + context.addSourceFile(file);
|
| + CompilationUnit unit = context.translate();
|
| + assertEquals(
|
| + toString(
|
| + "class Test {",
|
| + " static void main(List<String> vars) {",
|
| + " for (String var2 in vars) {",
|
| + " print(var2);",
|
| + " }",
|
| + " }",
|
| + " static void print(String p) {",
|
| + " }",
|
| + "}"),
|
| + getFormattedSource(unit));
|
| + }
|
| +
|
| public void test_forbiddenNames_methods() throws Exception {
|
| setFileLines(
|
| "test/Test.java",
|
|
|