d559212d70
#KT-18157 Fixed Target versions 1.1.4
22 lines
299 B
Kotlin
Vendored
22 lines
299 B
Kotlin
Vendored
sealed class A {
|
|
object B : A()
|
|
|
|
class C : A()
|
|
}
|
|
|
|
fun foo(): A = A.C()
|
|
|
|
fun box(): String {
|
|
val a: A = foo()
|
|
val b: Boolean
|
|
when (a) {
|
|
A.B -> b = true
|
|
is A.C -> b = false
|
|
}
|
|
return if (!b) "OK" else "FAIL"
|
|
}
|
|
|
|
// 0 TABLESWITCH
|
|
// 0 LOOKUPSWITCH
|
|
// 1 ATHROW
|