Community
Participate
Working Groups
3.1M4 The following class compiles fine with Sun's javac, but eclipse reports the following error: The method method(List<? extends T>, T, Test.Typed<? super T>) in the type Test is not applicable for the arguments (List<Test.B>, Test.B, Test.MyTyped) public class Test { List<B> itsList; B itsB; MyTyped itsTyped; public void test() { method (itsList, itsB, itsTyped); } public <T> void method (List<? extends T> arg1, T arg2, Typed<? super T> arg3) { } interface A{} class B implements A{} class Typed<T>{} class MyTyped extends Typed<A>{} } If A is a class instead of an interface, there is no problem. It is possible to simplify the test case: public class Test { Typed<B> itsList; Typed<A> itsTyped; public void test() { method (itsList, itsTyped); } public <T> void method (Typed<? extends T> arg1, Typed<? super T> arg3) { } interface A{} class B implements A{} class Typed<T>{} }
Cannot reproduce any longer in latest. Added GenericTypeTest#test473-474 Closing