Files
kotlin/compiler/testData/codegen/controlStructures/tryCatch.kt
2013-01-24 21:12:27 +04:00

10 lines
217 B
Kotlin
Vendored

fun foo(s: String): String? {
try {
Integer.parseInt(s);
return "no message";
}
catch(e: NumberFormatException) {
return (e : Throwable).getMessage(); // Work around an overload-resolution bug
}
}