Community
Participate
Working Groups
The code sample involving 4 classes (3 toplevel ones) is cleanly compilable with javac 1.5.0_06 (linux-i386, linux-amd64) and Eclipse 3.2.0M3, but _is not_ with Eclipse 3.2.0M4 (the same platforms). There's one more issue with that: actually Eclipse _does compile_ the code (all *.class files are present in the output folder), but reports an error about parameterized type not visible.
Created attachment 34782 [details] a/AbstractFoo.java
Created attachment 34783 [details] b/CustomFoo.java
Created attachment 34784 [details] b/DefaultFoo.java
Testcase (3 Java source files) added as attachments.
Problem comes from uniformization of parameterized bindings. In one situation, it still checked only for enclosing generic type (instead of param type as well in inherited member type scenario). Same issue for parameterized qualified type references. Simpler testcase: public class X<T> { static class Inner<U> { } } class Y<W> extends X<W> { void foo() { Inner<W> inner = null; String s = inner; // error msg should show X.Inner<W> // instead of not: X<W>.Inner<W> } }
Testcase with qualified name, only error should be reported on String assignment: public class X<T> { static class Inner<U> { class InInner <V> { } } } class Y<W> extends X<W> { void foo() { Inner<W>.InInner<W> inner = null; String s = inner; } }
Added GenericTypeTest#test933-936. Fixed
Verified for 3.2 M6 using build I20060328-0010