Community
Participate
Working Groups
The compiler is issuing an invalid diagnostic saying "cannot convert from Unmarshaller.Handler to Unmarshaller.Handler" when assigning to h. interface Prop<BeanT> { Unmarshaller.Handler createHandler(); } abstract class Unmarshaller { public static abstract class Handler {} } class X { void foo(Prop p) { Unmarshaller.Handler h = p.createHandler(); } }
Reproduced in latest.
Created attachment 26740 [details] Proposed patch The problem is that scope is creating a raw type for handler because it is a nested type. The patch modifies the substitution code to only create the raw type for a nested type if the outer type is susbstituted.
Thanks Tim, you identified well the offending code in Scope. My fix is very similar, simply reorganized the code to deal with member types in the previous catch (no more fall-thru which ends up adding complexity). Added GenericTypeTest#test0807-808. Fixed
Verified in I20050921-0010 for 3.2M2
Verified using M20050923-1430 for 3.1.1