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

13 lines
221 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
open class A {
fun f(): String =
when (this) {
is B -> x
else -> "FAIL"
}
}
class B(val x: String) : A()
fun box() = B("OK").f()