blob: e19857c469c0f061d62f8ea23a9ad931cc978194 [file]
// WITH_STDLIB
import kotlin.test.*
val sb = StringBuilder()
fun box(): String {
sb.appendLine(foo())
assertEquals("""
Done
Finally
0
""".trimIndent(), sb.toString())
return "OK"
}
fun foo(): Int {
try {
sb.appendLine("Done")
return 0
} finally {
sb.appendLine("Finally")
}
sb.appendLine("After")
return 1
}