Lines 11606-11612
Link Here
|
11606 |
"1. ERROR in X5.java (at line 1)\n" + |
11606 |
"1. ERROR in X5.java (at line 1)\n" + |
11607 |
" class X5 <T extends Y & Comparable<X5>> {}\n" + |
11607 |
" class X5 <T extends Y & Comparable<X5>> {}\n" + |
11608 |
" ^^^^^^^^^^\n" + |
11608 |
" ^^^^^^^^^^\n" + |
11609 |
"Bound conflict: Comparable<X5> is inherited with conflicting arguments\n" + |
11609 |
"The interface Comparable cannot be implemented more than once with different arguments: Comparable<X5> and Comparable<Y>\n" + |
11610 |
"----------\n" |
11610 |
"----------\n" |
11611 |
// Comparable cannot be inherited with different arguments: <X5> and <Y> |
11611 |
// Comparable cannot be inherited with different arguments: <X5> and <Y> |
11612 |
); |
11612 |
); |
Lines 11618-11627
Link Here
|
11618 |
"abstract class Z implements Comparable<Z> {}", |
11618 |
"abstract class Z implements Comparable<Z> {}", |
11619 |
}, |
11619 |
}, |
11620 |
"----------\n" + |
11620 |
"----------\n" + |
11621 |
"1. ERROR in X6.java (at line 1)\r\n" + |
11621 |
"1. ERROR in X6.java (at line 1)\n" + |
11622 |
" class X6 <T extends Y & Comparable<X6>> {}\r\n" + |
11622 |
" class X6 <T extends Y & Comparable<X6>> {}\n" + |
11623 |
" ^^^^^^^^^^\n" + |
11623 |
" ^^^^^^^^^^\n" + |
11624 |
"Bound conflict: Comparable<X6> is inherited with conflicting arguments\n" + |
11624 |
"The interface Comparable cannot be implemented more than once with different arguments: Comparable<X6> and Comparable<Z>\n" + |
11625 |
"----------\n" |
11625 |
"----------\n" |
11626 |
// Comparable cannot be inherited with different arguments: <X6> and <Y> |
11626 |
// Comparable cannot be inherited with different arguments: <X6> and <Y> |
11627 |
); |
11627 |
); |
Lines 11633-11642
Link Here
|
11633 |
"abstract class Z implements Comparable<Z> {}", |
11633 |
"abstract class Z implements Comparable<Z> {}", |
11634 |
}, |
11634 |
}, |
11635 |
"----------\n" + |
11635 |
"----------\n" + |
11636 |
"1. ERROR in X7.java (at line 1)\r\n" + |
11636 |
"1. ERROR in X7.java (at line 1)\n" + |
11637 |
" class X7 <T extends Comparable<Z> & Comparable<X7>> {}\r\n" + |
11637 |
" class X7 <T extends Comparable<Z> & Comparable<X7>> {}\n" + |
11638 |
" ^^^^^^^^^^\n" + |
11638 |
" ^^^^^^^^^^\n" + |
11639 |
"Bound conflict: Comparable<X7> is inherited with conflicting arguments\n" + |
11639 |
"The interface Comparable cannot be implemented more than once with different arguments: Comparable<X7> and Comparable<Z>\n" + |
11640 |
"----------\n" |
11640 |
"----------\n" |
11641 |
// Comparable cannot be inherited with different arguments: <Z> and <X7> |
11641 |
// Comparable cannot be inherited with different arguments: <Z> and <X7> |
11642 |
); |
11642 |
); |
Lines 22010-22014
Link Here
|
22010 |
}, |
21984 |
}, |
22011 |
""); |
21985 |
""); |
22012 |
} |
21986 |
} |
|
|
21987 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=100619 |
21988 |
public void test768() { |
21989 |
this.runNegativeTest( |
21990 |
new String[] { |
21991 |
"X.java", |
21992 |
"public class X {\n" + |
21993 |
" <T extends Runnable, U extends Runnable & T> T foo1() { return null; }\n" + |
21994 |
" <T extends Y<Object>, U extends Z & T> T foo2() { return null; }\n" + |
21995 |
" <T extends Y<Object>, U extends T & Z> T foo3() { return null; }\n" + |
21996 |
" <T extends Y<Object>, U extends W & Z> T foo4() { return null; }\n" + |
21997 |
"}\n" + |
21998 |
"\n" + |
21999 |
"interface Y<T> {\n" + |
22000 |
"}\n" + |
22001 |
"\n" + |
22002 |
"interface Z extends Y<String> {}\n" + |
22003 |
"interface W extends Y<Object> {}\n", |
22004 |
}, |
22005 |
"----------\n" + |
22006 |
"1. ERROR in X.java (at line 2)\n" + |
22007 |
" <T extends Runnable, U extends Runnable & T> T foo1() { return null; }\n" + |
22008 |
" ^\n" + |
22009 |
"The type T is not an interface; it cannot be specified as a bounded parameter\n" + |
22010 |
"----------\n" + |
22011 |
"2. ERROR in X.java (at line 3)\n" + |
22012 |
" <T extends Y<Object>, U extends Z & T> T foo2() { return null; }\n" + |
22013 |
" ^\n" + |
22014 |
"The type T is not an interface; it cannot be specified as a bounded parameter\n" + |
22015 |
"----------\n" + |
22016 |
"3. ERROR in X.java (at line 5)\n" + |
22017 |
" <T extends Y<Object>, U extends W & Z> T foo4() { return null; }\n" + |
22018 |
" ^\n" + |
22019 |
"The interface Y cannot be implemented more than once with different arguments: Y<String> and Y<Object>\n" + |
22020 |
"----------\n"); |
22021 |
} |
22013 |
} |
22022 |
} |
22014 |
|
22023 |
|