Put default value to vars iff they are not boxed
#KT-24672 Fixed
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
fun test(i: Int): Char {
|
||||
var 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
|
||||
Reference in New Issue
Block a user