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').
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// TODO: investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// See https://youtrack.jetbrains.com/issue/KT-14939
|
||||
|
||||
val String?.ok: String
|
||||
get() = "OK"
|
||||
|
||||
fun box() = (null::ok).get()
|
||||
Reference in New Issue
Block a user