Files
kotlin/compiler/testData/codegen/bytecodeText/when/exhaustiveWhenInitialization.kt
2018-12-21 16:20:45 +01:00

16 lines
220 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
enum class A { V }
fun box(): String {
val a: A = A.V
val b: Boolean
when (a) {
A.V -> b = true
}
return if (b) "OK" else "FAIL"
}
// 1 TABLESWITCH
// 0 LOOKUPSWITCH
// 1 ATHROW