mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
10 lines
197 B
Kotlin
Vendored
10 lines
197 B
Kotlin
Vendored
fun foo(s: String): String? {
|
|
try {
|
|
Integer.parseInt(s);
|
|
return "no message";
|
|
}
|
|
catch(e: NumberFormatException) {
|
|
return e.message // Work around an overload-resolution bug
|
|
}
|
|
}
|