Community
Participate
Working Groups
Using latest, that code compiles fine, but it should fail because two methods are inherited with the same signature. class A<T> { void foo(T t) {} void foo(String i) {} } public class X<T> extends A<String> {} If you change it for: class A<T> { void foo(T t) {} void foo(String i) {} } public class X<T> extends A<String> { public static void main(String[] args) { new X<String>().foo(""); } } We do report an ambiguous call. ---------- 1. ERROR in C:\tests_sources\X.java (at line 8) new X<String>().foo(""); ^^^ The method foo(String) is ambiguous for the type X<String> ---------- 1 problem (1 error)
*** Bug 80028 has been marked as a duplicate of this bug. ***
Added MethodVerify test023
fixed.
Verified in 200412160010