Files
kotlin-fork/compiler/testData/diagnostics/tests/controlFlowAnalysis/reassignmentInCatch.kt
T
2023-07-05 06:56:14 +00:00

16 lines
222 B
Kotlin
Vendored

// ISSUE: KT-42995
fun test() {
val a: Int
try {
run {
a = 1
a.inc()
throw Exception("hmm")
}
} catch (e: Exception) {
a = 2
a.inc()
}
}