Community
Participate
Working Groups
I have a set of classes coded as defined here. A full set of compileable class files are available at the attached url (until this bug is resolved). 1 //A.java: 2 public class A<T extends A<T>> extends SomeArbitraryClass<T> { 3 4 public static class B { 5 6 protected void set(C val) { ... } 7 8 protected class C { ... } 9 } 10 } 11 12 //ObjThatExtendsB.java 13 public class ObjThatExtendsB extends A.B { 14 15 protected void doSomeSetting() { 16 super.set(new ObjThatExtendsC()); //compile error is on this super.set() call. 17 } 18 19 protected class ObjThatExtendsC extends C { ... } 20 } This code compiles error-free in Sun 1.5.0_05 but produces the following problem in Eclipse, regarding line 16 above: "The method set(A<T>.B.C) in the type A.B is not applicable for the arguments (ObjThatExtendsB.ObjThatExtendsC)" Since B is a static inner class, should not Eclipse realize extensions B.C independent of A<T>? I've coded the simple work-around but this is still an issue seeing as the sun compiler handles the code well. SF
This is fixed in HEAD, but not in 3.1 maintenance. Might be a good candidate for 3.1.2
I suspect it got fixed by merging generic and parameterized bindings, which isn't planned to be backported. So, if this is the case, it would need to be solved differently for 3.1.2.
No action planned for 3.1.x. It works fine in 3.2 recent drops. Olivier - pls add a testcase in HEAD for this.
Added org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest.test899. Closing as WORKSFORME since fixed in HEAD, but no changes were made relative to this bug.
Created attachment 34103 [details] original example class files. For archiving's sake, here are the original example class files.
the test899 reflects exactly your test case.
Thought it might -- will keep in mind going forward, thanks!