[Test] Add test for KT-42995

This commit is contained in:
Dmitriy Novozhilov
2023-07-03 14:40:28 +03:00
committed by Space Team
parent a35b3bfd17
commit eb041d5d6d
7 changed files with 60 additions and 0 deletions
@@ -0,0 +1,15 @@
// ISSUE: KT-42995
fun test() {
val a: Int
try {
run {
a = 1
a.inc()
throw Exception("hmm")
}
} catch (e: Exception) {
<!VAL_REASSIGNMENT!>a<!> = 2
a.inc()
}
}
@@ -0,0 +1,15 @@
// ISSUE: KT-42995
fun test() {
val a: Int
try {
run {
a = 1
a.inc()
throw Exception("hmm")
}
} catch (e: Exception) {
a = 2
a.inc()
}
}