My implementation of a getHandler
method, which is defined on a Java interface, has failed, and I don't know why. Here is the method signature:
<H extends EventHandler> H getHandler( Type<H> type, int index );
My implementation in Scala is:
def getHandler[H <: com.google.gwt.event.shared.EventHandler]
(aType: Type[H], index: Int): H
= new com.google.gwt.event.shared.EventHandler() {}
...but the compiler gives me this message:
type mismatch;
found: java.lang.Object with com.google.gwt.event.shared.EventHandler
required: H
Where have I erred?