blob: 89a0f2d67ad4b8a0c10f6cca071fddbb01c45c65 [file] [log] [blame]
sealed class A {
class B : A()
class C : A()
}
inline fun foo(): A = A.B()
fun box(): String {
val a: A = foo()
val b: Boolean
when (a) {
is A.B -> b = true
is A.C -> b = false
}
return if (b) "OK" else "FAIL"
}