Community
Participate
Working Groups
The following three classes appear to compile fine in Eclipse: Foo.java -------- interface Foo<T> { void foo(T item); } Bar.java -------- public class Bar { public void foo(Object item) { } public void foo(String item) { } } Test.java --------- public class Test extends Bar implements Foo<String> { } However compiling the same classes with javac (Sun 1.5.0_15) results in the following error: Test.java:1: name clash: foo(java.lang.Object) in Bar and foo(T) in Foo<java.lang.String> have the same erasure, yet neither overrides the other public class Test extends Bar implements Foo<String> { ^ 1 error
Reproduced with 3.4.0. We differ from Javac6.0 or 7.0.
Released for 3.5M1 Released for 3.4.1 Added MethodVerifyTest 166
Patch for HEAD is attached to bug 238817
Verified for 3.5M1 using I20080805-1307
Verified for 3.4.1 using M20080827-2000