Files
kotlin/compiler/testData/codegen/bytecodeText/localInitializationLVT/whenStatement.kt
2020-02-18 22:51:29 +03:00

24 lines
468 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// TODO KT-36812 Generate proper lifetime intervals for local variables in JVM_IR
fun test(i: Int): Char {
val c: Char
when (i) {
1 -> c = '1'
2 -> c = '2'
3 -> c = '3'
4 -> c = '4'
5 -> c = '5'
6 -> c = '6'
7 -> c = '7'
8 -> c = '8'
9 -> c = '9'
0 -> c = '0'
else -> c = ' '
}
return c
}
// 12 ISTORE 1
// 1 LOCALVARIABLE c C L1 L16 1