backend: add two more tests for finally

This commit is contained in:
Svyatoslav Scherbina
2016-12-05 13:34:10 +07:00
committed by SvyatoslavScherbina
parent 4a1b3f2824
commit 2531c34b64
3 changed files with 38 additions and 0 deletions
@@ -0,0 +1,12 @@
fun main(args : Array<String>) {
while (true) {
try {
continue
} finally {
println("Finally")
break
}
}
println("After")
}
@@ -0,0 +1,16 @@
fun main(args : Array<String>) {
try {
try {
return
} catch (e: Error) {
println("Catch 1")
} finally {
println("Finally")
throw Error()
}
} catch (e: Error) {
println("Catch 2")
}
println("Done")
}