Files
kotlin/compiler/testData/codegen/controlStructures/tryCatch.kt
2015-10-12 11:11:23 +02:00

10 lines
203 B
Kotlin
Vendored

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