[FIR] Try to infer result type of incomplete when expression

^KT-62069 Fixed
This commit is contained in:
Ivan Kochurkin
2023-11-17 12:51:56 +01:00
committed by Space Team
parent e2f245096c
commit 88f7b085e6
28 changed files with 113 additions and 59 deletions
@@ -17,7 +17,7 @@ FILE: missingEnumEntry.kt
}
public final fun test_1(enum: R|SomeEnum|): R|kotlin/Unit| {
lval x: R|kotlin/Unit| = when (R|<local>/enum|) {
lval x: R|kotlin/Int| = when (R|<local>/enum|) {
==($subj$, Q|SomeEnum|.R|/SomeEnum.A|) -> {
Int(1)
}
@@ -34,7 +34,7 @@ FILE: missingEnumEntry.kt
}
public final fun test_2(enum: R|SomeEnum?|): R|kotlin/Unit| {
lval x: R|kotlin/Unit| = when (R|<local>/enum|) {
lval x: R|kotlin/Int| = when (R|<local>/enum|) {
==($subj$, Q|SomeEnum|.R|/SomeEnum.A|) -> {
Int(1)
}