Community
Participate
Working Groups
Given the code on 3.1M2, using Java 1.5.0-rc: ******** import java.util.*; public class Test2<A> { A v2; Test2(A a) { v2 = a; } void func() { List<B<A>> l = new ArrayList<B<A>>(); } class B<T> { T v1; B(T b) { v1 = b; } } } ************ There are 4 cases (1) class B is defined within class Test2 as above, I get the error "Type mismatch: cannot convert from ArrayList<Test2.B<A>> to List<Test2.B<A>>" (2) class B is defined within class Test2 as above, but now "static", I get the same error. (3) same as case (2), but the parameter type to List and ArrayList are fully qualified like so: "List<Test2.B<A>>", the I do not get the error. (4) class B is defined (non-static) outside the Test2 class definition, but still within the same file, then I do not get the error.
Another member type compatibility case
First member type (from single/qualified scenario) was not recreating raw enclosing type when accessed implicitly. Fixed. Added regression test: GenericTypeTest#test322
*** Bug 75525 has been marked as a duplicate of this bug. ***
Verified for 3.1M3 with build I200411040100