summaryrefslogtreecommitdiff
path: root/test/files/pos/exceptions.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/exceptions.scala')
-rw-r--r--test/files/pos/exceptions.scala19
1 files changed, 17 insertions, 2 deletions
diff --git a/test/files/pos/exceptions.scala b/test/files/pos/exceptions.scala
index 93140ddbbe..50d84d3d30 100644
--- a/test/files/pos/exceptions.scala
+++ b/test/files/pos/exceptions.scala
@@ -1,6 +1,21 @@
+import java.io._;
+
module test {
- def error[a](x: String):a = new java.lang.RuntimeException(x) throw;
+ //def error[a](x: String):a = new java.lang.RuntimeException(x) throw;
+
+ def main(): Unit {
+ try {
+ try {
+ error[Unit]("hi!");
+ } finally {
+ System.out.println("ho!")
+ }
+ } except {
+ case ex: IOException => System.out.println("io exception!");
+ case ex => System.out.println(ex);
+ }
+ }
- def main = error("hi!");
+ main();
} \ No newline at end of file