Method designator binds to a method returning T whereas return type T is specified (OTJLD 4.1(c))
<T extends Specializable> T castAs(Class<T> type) <- replace T castAs(Class<T> type);
callin <T extends Specializable> T castAs(Class<T> type) {
return Education.this.castAs(type);
}
Two other variations with the generic also fail to compile.
Complete sources to reproduce the problem can be found on this link
Other compilation errors:
The return type of implicitly inherited method Education.Specialist.castAs() is not compatible to the return type of explicitly inherited method Education.Specialist.castAs() (1.3.1(k)).
sources
Internal compiler error: java.lang.NullPointerException at org.objectteams.otdt.core.internal.compiler.mappings.CallinI mplementor.createWrapperMethod(CallinImplementor.java:274)
sources
[Updated on: Wed, 06 January 2010 02:28] by Moderator