Community
Participate
Working Groups
1/30 nightly build these codes compiles with javac, but eclipse not // IA public interface IA<E> { } // IB public interface IB<E> extends IA<E> { } // A public class A<E> implements IA<E> { } // B public class B<E> implements IB<E> { } // Test public class Test { public static void main(String[] args) { A<Integer> x = new A<Integer>(); B<Integer> y = new B<Integer>(); print(x); print(y); // The method print(B<Integer>) is ambiguous for the type Test } public static <T extends IA<?>> void print(T a) { System.out.println("A"); } public static <T extends IB<?>> void print(T a) { System.out.println("B"); } }
Philippe can you take a look at this one? I think the tiebreak methods should be able to decide that one is a better match than the other, but we end up comparing a Parameterized IA to the Source IA & fail.
Kent - I cannot reproduce in latest. Your recent changes may have addressed it. Can you double check, and add a regression test for it ?
Added MethodVerify test057
Verified using N20050606-0010 + JDT/Core HEAD
Verified for 3.1 RC2 using build I20050610-0010
close