Community
Participate
Working Groups
Version 3.1, Build 200410260800, Java 1.5 The following code compiles without problem using javac, but Eclipse reports a problem as stated in the comment. ==================== interface M<X> { } class N<C> { M<N<C>> pni = null; } class O<I> { N<I> var1 = null; M<N<I>> var2 = var1.pni; // Above line reports as error in Eclipse. // "var2" is underlined and the error message is: // Type mismatch: cannot convert from M<N<C>> to M<N<I>> } ====================
I've noticed that if each interface and class were in their own separate files (M.java, N.java, O.java), then Eclipse does not complain and the resolution is done properly.
Substitution algorithm did not properly handle ParametizedType of GenericType (no nested type variables). Fixed. Added regression test: GenericTypeTest#test338
*** Bug 72998 has been marked as a duplicate of this bug. ***
*** Bug 76313 has been marked as a duplicate of this bug. ***
Verified for 3.1M3 with build I200411040100