mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 00:21:29 +00:00
13 lines
221 B
Kotlin
Vendored
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()
|