Not sure if this is a compiler bug but the following pattern leads to method resolution error messages:
fun foo(getter: (Email) -> User, block: (User) -> Unit) = // function body that uses the getter and then calls the block with the result
class Getter {
fun by(email: Email): User
fun by(id: Id): User
}
val getterInstance = Getter()
foo(getterInstance::by) {...} // ERROR method signature can't be resolved
I’m curious why the compiler can’t figure out how to resolve the method signature given that the function taking it has a type that matches the fun by(email: Email): User
signature.
what am i missing here?