JS: fix callable reference with implicit extension receiver (KT-22638 fixed)

This commit is contained in:
Anton Bannykh
2018-02-01 17:41:11 +03:00
parent f4e2102787
commit 3ead464671
4 changed files with 50 additions and 13 deletions
@@ -53,5 +53,33 @@ fun box(): String {
val b = A().B().test()
if (b != "A.amf,A.ef,A.amp,A.ep,B.mf,B.mp,B.ef,B.ep,") return "Fail $b"
result = ""
with(A()) {
(::memberFunction)()
(::aExtensionFunction)()
(::memberProperty)()
(::aExtensionProperty)()
}
if (result != "A.mf,A.ef,A.mp,A.ep,") return "Fail $result"
result = ""
with(A()) {
with(B()) {
(::aMemberFunction)()
(::aExtensionFunction)()
(::aMemberProperty)()
(::aExtensionProperty)()
(::memberFunction)()
(::memberProperty)()
(::bExtensionFunction)()
(::bExtensionProperty)()
}
}
if (result != "A.amf,A.ef,A.amp,A.ep,B.mf,B.mp,B.ef,B.ep,") return "Fail $result"
return "OK"
}
@@ -1,3 +1,5 @@
// SKIP_SOURCEMAP_REMAPPING
fun box(): String {
var state = 0
val name = (state++)::toString.name