I’m having an issue understanding why something works in Java, but not in Kotlin.
I have two SAM Interfaces (SerializiableFunction, ProcessFunction).
I have two method overloads that accept these SAMs on the same class, e.g.:
public static void function(SerializableFunction<String, String> sf) {}
public static void function(ProcessFunction<String, String> pf) {}
In Java, i can do function(s → s) without issues, but in Kotlin it complains:
Error:(31, 14) Kotlin: Cannot choose among the following candidates without completing type inference
Why does this work in Java? Both method overloads would apply here, so it ought to either not work or work in both, right?