[FIR LT] Fix crash in incomplete when condition without type

#KT-58908 Fixed
This commit is contained in:
Kirill Rakhman
2023-06-22 14:54:51 +02:00
committed by Space Team
parent be232d3e6f
commit 896f8853ae
8 changed files with 45 additions and 2 deletions
@@ -0,0 +1,9 @@
FILE: incompleteWhen.kt
public final fun main(args: R|kotlin/Array<kotlin/String>|): R|kotlin/Unit| {
lval x: R|kotlin/Int| = Int(42)
when (R|<local>/x|) {
($subj$ is <ERROR TYPE REF: Incomplete code>) -> {
}
}
}
@@ -0,0 +1,4 @@
fun main(args: Array<String>) {
val x = 42
when (x) {is<!SYNTAX!><!>}
}