Slackbot
11/06/2017, 3:58 PMelizarov
11/06/2017, 4:04 PMtrevjones
11/06/2017, 4:05 PMto
method is a static method because an instance based method should always win in the dispatching order afaik. you might either use a more qualified method call or use an import alias to disambiguate without actually refactoring the original method.jhorvat
11/06/2017, 4:05 PMelizarov
11/06/2017, 4:06 PMto
function gets invoked instead of member method to
.jhorvat
11/06/2017, 4:12 PM// Java
public class SomeObject {
public void to(OtherObject foo) {
System.out.println(foo.toString())
}
}
// Kotlin
val param = OtherObject()
SomeObject().to(param) // Returns a Pair<SomeObject, OtherObject>
kartikpatodi
11/06/2017, 7:05 PMilya.gorbunov
11/06/2017, 11:02 PMto
is resolved to instance method.param
you pass to this method is not OtherObject
?trevjones
11/06/2017, 11:43 PMOtherObject
?ilya.gorbunov
11/06/2017, 11:47 PM