### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java,v retrieving revision 1.167 diff -u -r1.167 ClassScope.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 21 Nov 2008 20:03:08 -0000 1.167 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 6 Jan 2009 20:51:49 -0000 @@ -202,6 +202,10 @@ LocalTypeBinding localType = buildLocalType(enclosingType, null /* anonymous super type*/, enclosingType.fPackage); connectTypeHierarchy(); + if (compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) { + checkParameterizedTypeBounds(); + checkParameterizedSuperTypeCollisions(); + } buildFieldsAndMethods(); localType.faultInTypesForFieldsAndMethods(); #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.780 diff -u -r1.780 GenericTypeTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 15 Dec 2008 11:11:54 -0000 1.780 +++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 6 Jan 2009 20:51:54 -0000 @@ -48399,4 +48399,44 @@ "Foo is a raw type. References to generic type Foo should be parameterized\n" + "----------\n"); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=258039 +public void test1431() throws Exception { + this.runNegativeTest( + new String[] { + "X.java", //================================= + "public class X {\n" + + " void foo() {\n" + + " class M {}\n" + + " class N extends M {}\n" + + " class O implements I, I {}\n" + + " }\n" + + " class MM {}\n" + + " class NN extends MM {}\n" + + " class OO implements I, I {}\n" + + "}\n" + + "interface I {}" + }, + "----------\n" + + "1. ERROR in X.java (at line 4)\n" + + " class N extends M {}\n" + + " ^^^^^^\n" + + "Bound mismatch: The type String is not a valid substitute for the bounded parameter of the type M\n" + + "----------\n" + + "2. ERROR in X.java (at line 5)\n" + + " class O implements I, I {}\n" + + " ^\n" + + "The interface I cannot be implemented more than once with different arguments: I and I\n" + + "----------\n" + + "3. ERROR in X.java (at line 8)\n" + + " class NN extends MM {}\n" + + " ^^^^^^\n" + + "Bound mismatch: The type String is not a valid substitute for the bounded parameter of the type X.MM\n" + + "----------\n" + + "4. ERROR in X.java (at line 9)\n" + + " class OO implements I, I {}\n" + + " ^^\n" + + "The interface I cannot be implemented more than once with different arguments: I and I\n" + + "----------\n" + ); +} } \ No newline at end of file