Index: src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java,v retrieving revision 1.319 diff -u -r1.319 GenericTypeTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 17 Jun 2005 09:26:42 -0000 1.319 +++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 21 Jun 2005 13:10:44 -0000 @@ -11606,7 +11606,7 @@ "1. ERROR in X5.java (at line 1)\n" + " class X5 > {}\n" + " ^^^^^^^^^^\n" + - "Bound conflict: Comparable is inherited with conflicting arguments\n" + + "The interface Comparable cannot be implemented more than once with different arguments: Comparable and Comparable\n" + "----------\n" // Comparable cannot be inherited with different arguments: and ); @@ -11618,10 +11618,10 @@ "abstract class Z implements Comparable {}", }, "----------\n" + - "1. ERROR in X6.java (at line 1)\r\n" + - " class X6 > {}\r\n" + + "1. ERROR in X6.java (at line 1)\n" + + " class X6 > {}\n" + " ^^^^^^^^^^\n" + - "Bound conflict: Comparable is inherited with conflicting arguments\n" + + "The interface Comparable cannot be implemented more than once with different arguments: Comparable and Comparable\n" + "----------\n" // Comparable cannot be inherited with different arguments: and ); @@ -11633,10 +11633,10 @@ "abstract class Z implements Comparable {}", }, "----------\n" + - "1. ERROR in X7.java (at line 1)\r\n" + - " class X7 & Comparable> {}\r\n" + + "1. ERROR in X7.java (at line 1)\n" + + " class X7 & Comparable> {}\n" + " ^^^^^^^^^^\n" + - "Bound conflict: Comparable is inherited with conflicting arguments\n" + + "The interface Comparable cannot be implemented more than once with different arguments: Comparable and Comparable\n" + "----------\n" // Comparable cannot be inherited with different arguments: and ); @@ -22010,5 +21984,134 @@ }, ""); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=100619 +public void test768() { + this.runNegativeTest( + new String[] { + "X.java", + "public class X {\n" + + " T foo1() { return null; }\n" + + " , U extends Z & T> T foo2() { return null; }\n" + + " , U extends T & Z> T foo3() { return null; }\n" + + " , U extends W & Z> T foo4() { return null; }\n" + + "}\n" + + "\n" + + "interface Y {\n" + + "}\n" + + "\n" + + "interface Z extends Y {}\n" + + "interface W extends Y {}\n", + }, + "----------\n" + + "1. ERROR in X.java (at line 2)\n" + + " T foo1() { return null; }\n" + + " ^\n" + + "The type T is not an interface; it cannot be specified as a bounded parameter\n" + + "----------\n" + + "2. ERROR in X.java (at line 3)\n" + + " , U extends Z & T> T foo2() { return null; }\n" + + " ^\n" + + "The type T is not an interface; it cannot be specified as a bounded parameter\n" + + "----------\n" + + "3. ERROR in X.java (at line 5)\n" + + " , U extends W & Z> T foo4() { return null; }\n" + + " ^\n" + + "The interface Y cannot be implemented more than once with different arguments: Y and Y\n" + + "----------\n"); +} }