### 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.697 diff -u -r1.697 GenericTypeTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 14 Apr 2008 17:21:23 -0000 1.697 +++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 18 Apr 2008 16:11:15 -0000 @@ -43550,4 +43550,24 @@ "Class is a raw type. References to generic type Class should be parameterized\n" + "----------\n"); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=209149 +public void test1311() { + String[] test = new String[] { + "X.java", + "class MyClass1 {}\n" + + "class MyClass2 {}" + }; + if (this.complianceLevel < ClassFileConstants.JDK1_7) { + this.runNegativeTest( + test, + "----------\n" + + "1. ERROR in X.java (at line 2)\n" + + " class MyClass2 {}\n" + + " ^\n" + + "Illegal forward reference to type parameter D\n" + + "----------\n"); + } else { + this.runConformTest(test, ""); + } +} } \ No newline at end of file #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v retrieving revision 1.326 diff -u -r1.326 Scope.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 17 Apr 2008 15:26:43 -0000 1.326 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 18 Apr 2008 16:11:17 -0000 @@ -482,9 +482,11 @@ isFirstBoundTypeVariable = true; TypeVariableBinding varSuperType = (TypeVariableBinding) superType; if (varSuperType.rank >= typeVariable.rank && varSuperType.declaringElement == typeVariable.declaringElement) { - problemReporter().forwardTypeVariableReference(typeParameter, varSuperType); - typeVariable.tagBits |= TagBits.HierarchyHasProblems; - break firstBound; // do not keep first bound + if (compilerOptions().complianceLevel <= ClassFileConstants.JDK1_6) { + problemReporter().forwardTypeVariableReference(typeParameter, varSuperType); + typeVariable.tagBits |= TagBits.HierarchyHasProblems; + break firstBound; // do not keep first bound + } } break; default :