[IR] Restore and fix ifConstVal test
It was accidentally dropped after KT-55196 fix.
This commit is contained in:
+4
-4
@@ -4,19 +4,19 @@ const val flag = true
|
||||
const val value = 10
|
||||
|
||||
const val condition = if (flag) "True" else "Error"
|
||||
const val withWhen = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>when (flag) {
|
||||
const val withWhen = when (flag) {
|
||||
true -> "True"
|
||||
else -> "Error"
|
||||
}<!>
|
||||
}
|
||||
const val withWhen2 = when {
|
||||
flag == true -> "True"
|
||||
else -> "Error"
|
||||
}
|
||||
const val withWhen3 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>when(value) {
|
||||
const val withWhen3 = when(value) {
|
||||
10 -> "1"
|
||||
100 -> "2"
|
||||
else -> "3"
|
||||
}<!>
|
||||
}
|
||||
const val multibranchIf = if (value == 100) 1 else if (value == 1000) 2 else 3
|
||||
|
||||
val nonConstFlag = true
|
||||
|
||||
Reference in New Issue
Block a user