Thu, 06 Jun 2013 15:33:40 +0100
8008627: Compiler mishandles three-way return-type-substitutability
Summary: Compiler should not enforce an order in how ambiguous methods should be resolved
Reviewed-by: jjg, vromero
1 /*
2 * @test /nodynamiccopyright/
3 * @ignore 7041019 Bogus type-variable substitution with array types with dependencies on accessibility check
4 * @bug 7034511 7040883
5 * @summary Loophole in typesafety
6 * @compile/fail/ref=T7034511a.out -XDrawDiagnostics T7034511a.java
7 */
9 // backing out 7034511, see 7040883
11 class T7034511a {
13 interface A<T> {
14 void foo(T x);
15 }
17 interface B<T> extends A<T[]> { }
19 static abstract class C implements B<Integer> {
20 <T extends B<?>> void test(T x, String[] ss) {
21 x.foo(ss);
22 }
23 }
24 }