Files
kotlin-fork/compiler/testData/codegen/box/controlStructures/tryFinallyGeneric.kt
T
Alexander Udalov 1071919706 Remove backend tests on old inference
Also remove any mentions of NewInference, and rename some tests.
2021-11-09 20:07:33 +01:00

25 lines
390 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_RUNTIME
val stack = mutableListOf<Int>()
fun <E> MutableList<E>.pop() = this.removeAt(size - 1)
fun foo() {}
fun getBoolean(): Boolean = true
fun box(): String {
val b = getBoolean()
if (b) {
stack.add(1)
try {
return "OK"
} finally {
stack.pop()
}
} else {
return "OK"
}
}