Files
kotlin/compiler/testData/codegen/controlStructures/tryCatch.kt
2015-10-14 20:39:59 +03:00

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
}
}