[IR] Restore and fix ifConstVal test

It was accidentally dropped after KT-55196 fix.
This commit is contained in:
Ivan Kylchik
2023-09-04 16:07:48 +02:00
committed by Space Team
parent 34f52aaeda
commit abc061e17f
19 changed files with 161 additions and 6 deletions
@@ -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