A work-around for an overload resolution bug

This commit is contained in:
Andrey Breslav
2011-05-03 13:21:21 +04:00
parent 9f0d0e8722
commit a265c364a3
+1 -1
View File
@@ -4,6 +4,6 @@ fun foo(s: String): String? {
return "no message";
}
catch(e: NumberFormatException) {
return e.getMessage();
return (e : Throwable).getMessage(); // Work around an overload-resolution bug
}
}