Files
kotlin-fork/compiler/testData/codegen/bytecodeText/when/switchOptimizationDuplicates.kt
T
Mark Punzalan 238cc7c257 [FIR] Enable BytecodeText tests for FIR.
143 out of 767 tests (18.6%) are currently failing.
2020-09-29 10:21:21 +03:00

20 lines
340 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
fun foo(x: Int): Int {
return when (x) {
1, 1, 2 -> 1001
1, 2 -> 1002
1 -> 1003
2 -> 1004
3 -> 1005
else -> 1006
}
}
// 1 SIPUSH 1001
// 0 SIPUSH 1002
// 0 SIPUSH 1003
// 0 SIPUSH 1004
// 1 SIPUSH 1005
// 1 SIPUSH 1006
// 1 TABLESWITCH
// 0 LOOKUPSWITCH