[FIR] Save info that when was used as expression

This commit is contained in:
Dmitriy Novozhilov
2021-02-04 12:49:24 +03:00
parent 490ef210ac
commit 11ab37160e
12 changed files with 81 additions and 2 deletions
@@ -0,0 +1,16 @@
FILE: whenWithWhenAsStatement.kt
public final fun test(value: R|kotlin/Int|): R|kotlin/Unit| {
when (R|<local>/value|) {
==($subj$, Int(0)) -> {
}
==($subj$, Int(1)) -> {
when (R|<local>/value|) {
==($subj$, Int(2)) -> {
Boolean(false)
}
}
}
}
}
@@ -0,0 +1,8 @@
fun test(value: Int) {
when (value) {
0 -> {}
1 -> when (value) {
2 -> false
}
}
}