Files
kotlin-fork/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt3162tryAsInitializer.kt
T
Andrey Zinovyev ec4cbfef59 [FIR] UNREACHABLE_CODE diagnostic (wip)
Implementation for PSI only
2021-08-04 14:42:24 +03:00

13 lines
267 B
Kotlin
Vendored

// FIR_IDENTICAL
//KT-3162 More precise try-finally error marking
fun foo(x: String) : String {
<!UNREACHABLE_CODE!>val <!UNUSED_VARIABLE!>a<!> =<!> try {
x
} finally {
try {
} catch (e: Exception) {
}
return x
}
}