Files
kotlin/compiler/testData/codegen/controlStructures/tryCatch.jet
2011-10-20 16:21:18 +02:00

10 lines
217 B
Plaintext

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