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