### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java,v retrieving revision 1.112 diff -u -r1.112 ParameterizedTypeBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 8 Jan 2009 20:51:05 -0000 1.112 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 30 Mar 2009 18:09:31 -0000 @@ -80,7 +80,17 @@ } } } - if (!hasErrors) this.tagBits |= TagBits.PassedBoundCheck; // no need to recheck it in the future + if (!hasErrors) { + this.tagBits |= TagBits.PassedBoundCheck; // no need to recheck it in the future + if (this.arguments != null) { + for (int i = 0, length = this.arguments.length; i < length; i++) { + if (this.arguments[i].leafComponentType() instanceof ParameterizedTypeBinding) { + ParameterizedTypeBinding parameterizedType = (ParameterizedTypeBinding) this.arguments[i].leafComponentType(); + parameterizedType.boundCheck(scope, argumentReferences); + } + } + } + } } } /** #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.793 diff -u -r1.793 GenericTypeTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 25 Mar 2009 20:17:48 -0000 1.793 +++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 30 Mar 2009 18:09:37 -0000 @@ -49455,4 +49455,41 @@ "" ); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=159851 +public void test1450() { + this.runNegativeTest( + new String[] { + "X.java", + "import java.util.*;\n" + + "class A {}\n" + + "class B {}\n" + + "class X>> extends TreeMap> {}\n" + + "\n" + + "class D {}\n" + + "class E {}\n" + + "class Y extends E> {}", + }, + "----------\n" + + "1. WARNING in X.java (at line 4)\n" + + " class X>> extends TreeMap> {}\n" + + " ^\n" + + "The serializable class X does not declare a static final serialVersionUID field of type long\n" + + "----------\n" + + "2. ERROR in X.java (at line 4)\n" + + " class X>> extends TreeMap> {}\n" + + " ^\n" + + "Bound mismatch: The type Integer is not a valid substitute for the bounded parameter of the type B\n" + + "----------\n" + + "3. ERROR in X.java (at line 4)\n" + + " class X>> extends TreeMap> {}\n" + + " ^^^^^^^\n" + + "Bound mismatch: The type String is not a valid substitute for the bounded parameter of the type B\n" + + "----------\n" + + "4. ERROR in X.java (at line 8)\n" + + " class Y extends E> {}\n" + + " ^\n" + + "Bound mismatch: The type D is not a valid substitute for the bounded parameter of the type E\n" + + "----------\n" + ); +} } \ No newline at end of file