### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java,v retrieving revision 1.754 diff -u -r1.754 GenericTypeTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 3 Sep 2008 09:02:11 -0000 1.754 +++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 9 Sep 2008 16:48:35 -0000 @@ -31,7 +31,7 @@ // All specified tests which does not belong to the class are skipped... static { // TESTS_NAMES = new String[] { "test0788" }; -// TESTS_NUMBERS = new int[] { 1369 }; +// TESTS_NUMBERS = new int[] { 1367, 1368, 1369 }; // TESTS_RANGE = new int[] { 1097, -1 }; } public static Test suite() { @@ -45934,7 +45934,7 @@ "2. ERROR in X.java (at line 4)\n" + " var= new HashMap();\n" + " ^^^\n" + - "Map cannot be resolved to a type\n" + + "Map cannot be resolved to a type\n" + "----------\n" + "3. ERROR in X.java (at line 4)\n" + " var= new HashMap();\n" + @@ -45943,7 +45943,7 @@ "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=244164 -public void _test1368() { +public void test1368() { this.runNegativeTest( new String[] { "X.java", //----------------------------------------------------------------------- @@ -45965,7 +45965,36 @@ "2. ERROR in X.java (at line 6)\n" + " return map.get(s);\n" + " ^^^\n" + - "Map cannot be resolved to a type\n" + + "Zork cannot be resolved to a type\n" + + "----------\n"); +} +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=244164 +public void test1369() { + this.runNegativeTest( + new String[] { + "X.java", //----------------------------------------------------------------------- + "class X {\n" + + " A a; // E is undefined on purpose\n" + + " X() { a = new A(); } // causes Missing code implementation\n" + + "}", + "A.java", + "class A {}",//----------------------------------------------------------------------- + }, + "----------\n" + + "1. ERROR in X.java (at line 2)\n" + + " A a; // E is undefined on purpose\n" + + " ^\n" + + "E cannot be resolved to a type\n" + + "----------\n" + + "2. ERROR in X.java (at line 3)\n" + + " X() { a = new A(); } // causes Missing code implementation\n" + + " ^\n" + + "E cannot be resolved to a type\n" + + "----------\n" + + "3. ERROR in X.java (at line 3)\n" + + " X() { a = new A(); } // causes Missing code implementation\n" + + " ^\n" + + "E cannot be resolved to a type\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=242448 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v retrieving revision 1.376 diff -u -r1.376 ProblemReporter.java --- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 5 Sep 2008 10:24:43 -0000 1.376 +++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 9 Sep 2008 16:48:37 -0000 @@ -14,6 +14,7 @@ import java.io.CharConversionException; import java.io.PrintWriter; import java.io.StringWriter; +import java.util.Iterator; import java.util.List; import org.eclipse.jdt.core.compiler.CategorizedProblem; @@ -3479,6 +3480,15 @@ } } + if (type.isParameterizedType()) { + List missingTypes = type.collectMissingTypes(null); + if (missingTypes != null) { + for (Iterator iterator = missingTypes.iterator(); iterator.hasNext(); ) { + invalidType(location, (TypeBinding) iterator.next()); + } + return; + } + } int id = IProblem.UndefinedType; // default switch (type.problemId()) { case ProblemReasons.NotFound :