i'm having some trouble with type inference again ...
# getting-started
t
i'm having some trouble with type inference again 🤔 i have a functional interface (java)
Copy code
@FunctionalInterface
public interface ConnectHandler {
    void handle(Session session);
}
and a function which uses it:
Copy code
fun onConnect(connectHandler: ConnectHandler) {
    this.connectHandler = connectHandler
}
and i get:
Copy code
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?