tipsy
09/20/2017, 4:10 PM@FunctionalInterface
public interface ConnectHandler {
void handle(Session session);
}
and a function which uses it:
fun onConnect(connectHandler: ConnectHandler) {
this.connectHandler = connectHandler
}
and i get:
Type mismatch.
Required: ConnectHandler
Found: (???) → Unit
when calling this code from kotlin.. i suspect it might work if i convert the function to a java-method, but why is this required?