[FIR] Reimplement when exhaustiveness checker to fir it's logic with FE 1.0

This commit is contained in:
Dmitriy Novozhilov
2021-02-06 12:34:32 +03:00
parent 2a1c9283a4
commit 18bde2c542
11 changed files with 329 additions and 233 deletions
@@ -107,10 +107,10 @@ FILE: exhaustiveness_sealedSubClass.kt
}
}
.<Unresolved name: plus>#(Int(0))
lval d: R|ERROR CLASS: Unresolved name: plus| = when (R|<local>/e|) {
lval d: R|kotlin/Int| = when (R|<local>/e|) {
($subj$ is R|C|) -> {
Int(1)
}
}
.<Unresolved name: plus>#(Int(0))
.R|kotlin/Int.plus|(Int(0))
}
@@ -48,7 +48,7 @@ fun test_2(e: A) {
is D -> 2
}.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>plus<!>(0)<!>
val d = <!NO_ELSE_IN_WHEN!>when<!> (e) {
val d = when (e) {
is C -> 1
}.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>plus<!>(0)<!>
}.plus(0)
}