Community
Participate
Working Groups
Hello. I recently had inadvertently made reference to a static nested type through a subinterface inheriting this type. While this is not illegal, it was a mis-type on my part. It turns out the compiler -- at least the one that is drawing the error annotations in the editor -- thinks this is an error. But it actually only happens with a particular typing hierarchy. I have constructed the seeming minimal example: interface A { A.I i(); interface I { } } interface B<T> extends A { } interface C extends B<Object> { C.I i(); interface I extends B.I { } } The compiler complains that C.i() is incompatible with A.i(). [This is the bug.] But, if you modify the above so that B is not generic -- and C invokes no parameters on B -- then the compiler does not complain. Thanks! Steev Coco.
Reproduced with HEAD.
Problem comes from supertype of C.I; if making it be: A.I instead of B.I, then things work ok. The indirect case doesn't work properly.
Added GenericTypeTest#test860-865.
Fix released in 3.1.2 stream. Will release in HEAD (3.2) once M3 is declared.
Verified for 3.2M4 in I20051212-2000
Verified for 3.1.2 in M20060109-0800.