Make "localClassCaptureExtensionReceiver" test more robust and mute it for JS IR BE

This commit is contained in:
Zalim Bashorov
2018-07-13 20:06:49 +03:00
parent 3f0b31dc23
commit 74df1208ae
@@ -1,15 +1,25 @@
// IGNORE_BACKEND: JVM_IR // IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
class Outer { class Outer {
val foo = "Foo"
fun String.id(): String { fun String.id(): String {
class Local(unused: Long) { class Local(unused: Long) {
fun result() = this@id fun result() = this@id
fun outer() = this@Outer fun outer() = this@Outer
} }
return Local(42L).result() val l = Local(42L)
return l.result() + l.outer().foo
} }
fun result(): String = "OK".id() fun result(): String = "OK".id()
} }
fun box() = Outer().result() fun box(): String {
val r = Outer().result()
if (r != "OKFoo") return "Fail: $r"
return "OK"
}