Files
kotlin-fork/backend.native/tests/codegen/try/finally4.kt
T
2017-10-20 18:25:05 +03:00

29 lines
576 B
Kotlin

package codegen.`try`.finally4
import kotlin.test.*
@Test fun runTest() {
try {
try {
println("Try")
throw Error("Error happens")
println("After throw")
} catch (e: Error) {
println("Catch")
throw Exception()
println("After throw")
} finally {
println("Finally")
}
println("After nested try")
} catch (e: Error) {
println("Caught Error")
} catch (e: Exception) {
println("Caught Exception")
}
println("Done")
}