Community
Participate
Working Groups
Currently we get all 5 of these method calls incorrect. We report 1 error against the wrong method & miss the other 4. interface I<T> {} class X { void a(G x) {} void a(F<?> x) {} <T extends G> void b(T x) {} <T extends C, S extends F<T>> void b(S x) {} <T extends G> void c(T x) {} void c(F<?> x) {} <T extends G> void d(T x) {} <S extends F & I<S>> void d(S x) {} void x(G x) {} <S extends F> void x(S x) {} void test() { X x = new X(); H<C> h = null; H hraw = null; x.a(h); // ambiguous error x.b(h); // ambiguous error x.c(h); // ambiguous error x.d(hraw); // ambiguous error x.x(h); // NOT ambiguous } } class C {} class F<T1> {} class G<T2> extends F<T2> implements I<T2> {} class H<T3> extends G<T3> {}
Created attachment 123571 [details] Proposed patch and testcase
Fix and test released for 3.5M5
Philippe - should we fix this for 3.4.2 ?
Created attachment 123586 [details] Proposed patch and testcase for 3.4.2
Verified for 3.5M5 using I20090126-1300