Files
kotlin-fork/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_1.fir.kt
T

12 lines
270 B
Kotlin
Vendored

//KT-2585 Code in try-finally is incorrectly marked as unreachable
fun foo(x: String): String {
try {
throw RuntimeException()
} finally {
try {
} catch (e: Exception) {
}
return x // <- Wrong UNREACHABLE_CODE
}
}