<Resolve the ambiguity of kotlin's reference to ov...
# forum
r
Resolve the ambiguity of kotlin's reference to overloaded functions or fields In kotlin, reference fields or overloaded functions may be ambiguous. For example: object a { val a = 1 fun a(){} fun a(p: Int) = p } fun main() { a::a // error } Anyway, specifying the type explicitly can eliminate this ambiguity, like: fun main() { val t: kotlin.reflect.KProperty = a::a val t1: a.()->Unit = a::a val t2: a.(Int)->Int = a::a } However, this behavior is very complex, and local variable are also defined. At the same time, the return value type of...