christophsturm
03/14/2021, 10:49 PMfun mf(method: suspend () -> String) {
}
fun mf(method: suspend (String) -> String) {
}
and i can call the method that takes one parameter just fine:
mf({string->"string"})
but how can i call the other method?
mf({"string"}) // fails with overload resolution ambiguity
Shawn
03/15/2021, 12:46 AMwhere the only difference in signature is the number of parameters that their lambda takesalso I mean, sure, disparate arity means different function types, why wouldn’t that be overloadable?
christophsturm
03/15/2021, 9:03 AMmf({->"string"})
Matteo Mirk
03/24/2021, 10:45 AM() -> String
is a different type than (String) -> String
, thus overloading is possiblechristophsturm
03/24/2021, 11:18 AMMatteo Mirk
03/24/2021, 11:32 AM