Files
kotlin-fork/compiler/testData/codegen/box/finally/decrementInFinally.kt
T
vladislav.grechko 8b1d87848d [FIR2IR] Fix unwrapping of single-statement blocks
Unwrapping should be done with respect to `forceUnitType` parameter.

^KT-65019: Fixed
2024-01-30 14:26:10 +00:00

12 lines
236 B
Kotlin
Vendored

fun box(): String {
var variable = 0
try {
try {
null!!
} finally {
variable--
}
} catch (e: NullPointerException) {
return if (variable == -1) "OK" else "Fail"
}
}