Files
kotlin-fork/backend.native/tests/external/codegen/box/smartCasts/implicitReceiverInWhen.kt
T
2017-03-13 15:31:46 +03:00

12 lines
191 B
Kotlin

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