Community
Participate
Working Groups
Using the latest code, the following code reports an error and it should not: public class X<T> implements I<T> { public I.A foo() { return a; } } interface I<T> { A a = new A(); class A { } } We report: ---------- 1. ERROR in c:\tests_sources\X.java (at line 3) return a; ^ Type mismatch: cannot convert from I<T>.A to I.A ---------- 1 problem (1 error) javac 1.5 compiles it without error.
Implementation of type equivalence was incorrectly rejecting this scenario (due to check on no type variables improper for member types). Added regression test: GenericTypeTest#test326. Fixed
Verified for 3.1M3 with build I200411040100