tvede
06/06/2017, 6:18 PMtypealias myFunctiontype = (String, Int) -> String
abstract class AbstractExample{
abstract val baseFunction : myFunctiontype
}
class ImplExample : AbstractExample() {
override val baseFunction
get() = SomewhereElse::a
}
object SomewhereElse{
fun a() : String{
return ""
}
fun a(string: String) : String{
return ""
}
fun a(string: String, int: Int) : String{
return ""
}
}
if i put the type after the "baseFunction" it works, but i fail to see why the compiler cannot choose the rigth "a", since it already has all the types in place ?
Thanks 🙂