mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 08:31:28 +00:00
19 lines
252 B
Kotlin
Vendored
19 lines
252 B
Kotlin
Vendored
// OPTION: 0
|
|
fun foo(n: Int): Int {
|
|
try {
|
|
n / 0
|
|
}
|
|
catch (e: ArithmeticException) {
|
|
-1
|
|
}
|
|
catch (e: Exception) {
|
|
-2
|
|
}
|
|
<caret>finally {
|
|
val s = "finally"
|
|
println(s)
|
|
}
|
|
|
|
return 0
|
|
}
|