Community
Participate
Working Groups
This bug seems closely related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=100869. If you extend the example through a second bound, the JDT would issue the error when invoking the method m: The method m(Integer) is ambiguous for the type B. javac 1.6.0 compiles it without errors or warnings. Note that the @Override annotation does not result in any warning or error in the JDT. If you remove any of these two bounds or if A becomes an interface, the error would disappear. This error remains if A provides an implementation for m. abstract class A { abstract <T extends Number & Comparable<T>> void m(T x); } class B extends A { @Override <T extends Number & Comparable<T>> void m(T x) {} } class C { public static void main(String[] args) { new B().m(new Integer(1)); } }
Added AmbiguousMethodTest 65 Released into HEAD for 3.4 M2 Released for 3.3.1
+1 for 3.3.1
Verified for 3.3.1 using build M20070831-2000.
Verified for 3.4M2 using I20070917-1800