Files
kotlin/compiler/testData/codegen/box/smartCasts/implicitReceiver.kt
2019-11-19 11:00:09 +03:00

15 lines
211 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
open class A {
class B : A() {
val a = "FAIL"
}
fun foo(): String {
if (this is B) return a
return "OK"
}
}
fun box(): String = A().foo()