Add FIR test for KT-35565

This commit is contained in:
Mikhail Glukhikh
2021-10-21 12:52:04 +03:00
committed by TeamCityServer
parent 5deb96f679
commit 1fe7a1ebb3
5 changed files with 47 additions and 0 deletions
@@ -0,0 +1,13 @@
fun case(): String {
val x0 = false
val x1: String
val x: Boolean
try {
<!VAL_REASSIGNMENT!>x0<!> = (throw Exception()) || true //VAL_REASSIGNMENT should be
!<!UNINITIALIZED_VARIABLE!>x<!> //ok, unreachable code UNINITIALIZED_VARIABLE should be
val a: Int = <!UNINITIALIZED_VARIABLE!>x1<!>.toInt() //ok, unreachable code UNINITIALIZED_VARIABLE should be
} catch (e: Exception) {
return "OK"
}
return "NOK"
}