Files
kotlin-fork/compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt
T
Mikhail Glukhikh 522eeae062 FIR2IR: standardize expression with smart cast conversion
To convert smart cast expression, now we just convert
original expression in standard way and wrap it with TYPE_OP.
Before this commit original expression was converted in different way,
that led to errors e.g. for this expression casting.
2020-02-25 12:13:42 +03:00

13 lines
192 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()