Files
kotlin/compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt
Mikhail Glukhikh 0d35033106 Introduction of CastedClassReceiver and its handling in codegen #KT-6744 Fixed
ClassReceiver converted to Kotlin
Also #KT-7617 Fixed
2015-11-10 20:20:51 +03:00

12 lines
191 B
Kotlin
Vendored

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