Community
Participate
Working Groups
When compiling this (with AspectJ 1.6.2): ----------- public interface IMarker<CLOCK,STATE> { } public aspect MyAspect { public void IMarker<CLOCK,STATE>.map() { CLOCK[] var = find(); }; public CLOCK[] IMarker<CLOCK,STATE>.find() { return null; } } ----------- I get the error ..\src\foo\MyAspect.aj:10:0::0 Type mismatch: cannot convert from Object[] to CLOCK[] Michael Esser
The problem is due to the type variable being used in a array form. During type completion the type variable is collapsed to its bound for the find() return type and that causes problems at the call site 'CLOCK[] var = find()' since we then compare CLOCK[] and Object[].
test and fix committed. Fix in ResolvedMemberImpl - not great code but works.