Files
kotlin-fork/compiler/testData/codegen/box/callableReference/bound/objectReceiver.kt
T
Dmitry Petrov 3dd0c9d1c7 Equality comparison for bound callable references takes into account bound receiver.
Fixed KT-14939: use expected receiver type when generating receiver code in get/set methods for bound property references.
Otherwise we have VerifyError for bound receiver 'null' of type 'Nothing?', which is mapped to 'java.lang.Void'.

TODO: proper equality comparison for property accessors ('x::prop.getter', 'x::prop.setter').
2016-11-25 14:49:24 +03:00

5 lines
71 B
Kotlin
Vendored

object Singleton {
fun ok() = "OK"
}
fun box() = (Singleton::ok)()