[FIR] Fix "Expected some types" exception, ^KT-51274 Fixed

This commit is contained in:
Ivan Kochurkin
2022-02-15 21:02:34 +03:00
committed by teamcity
parent 6a3b7a9f91
commit 31d9313c51
10 changed files with 54 additions and 5 deletions
@@ -0,0 +1,9 @@
// ISSUE: KT-51274
fun test() {
val x = <!UNRESOLVED_REFERENCE!>unresolved<!>()
val y = when (x) {
is String -> x
else -> throw Exception()
}
}
@@ -0,0 +1,9 @@
// ISSUE: KT-51274
fun test() {
val x = <!UNRESOLVED_REFERENCE!>unresolved<!>()
val y = when (<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!>) {
is String -> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!>
else -> throw Exception()
}
}
@@ -0,0 +1,3 @@
package
public fun test(): kotlin.Unit