Try-catch-finally statements & correct line numbers

This commit is contained in:
Alexander Udalov
2012-11-22 17:35:30 +04:00
parent ca587513e3
commit 0f496eac21
8 changed files with 113 additions and 10 deletions
@@ -0,0 +1,15 @@
fun foo() {
try {
System.out?.println()
} catch (e: Throwable) {
return
}
val t = try {
System.out?.println()
} catch (e: Throwable) {
return
}
}
// 2 3 5 8 9 11 8
@@ -0,0 +1,19 @@
fun foo() {
try {
System.out?.println()
} catch (e: Throwable) {
System.out?.println()
} finally {
System.out?.println()
}
val t = try {
System.out?.println()
} catch (e: Throwable) {
System.out?.println()
} finally {
System.out?.println()
}
}
// 2 3 7 5 7 10 11 15 13 15 10
@@ -0,0 +1,15 @@
fun foo() {
try {
System.out?.println()
} finally {
System.out?.println()
}
val t = try {
System.out?.println()
} finally {
System.out?.println()
}
}
// 2 3 5 8 9 11 8