summaryrefslogtreecommitdiff
path: root/test-nsc/files/run/try.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test-nsc/files/run/try.scala')
-rw-r--r--test-nsc/files/run/try.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/test-nsc/files/run/try.scala b/test-nsc/files/run/try.scala
index bc339b71da..fca6bf5c55 100644
--- a/test-nsc/files/run/try.scala
+++ b/test-nsc/files/run/try.scala
@@ -57,6 +57,23 @@ object Test extends AnyRef with Application {
}
}
+ def try5 = try {
+ Console.print("1 + 1 = ");
+ try {
+ if (true)
+ error("exit");
+ 1+1;
+ ()
+ } catch {
+ case _ =>
+ Console.println("2");
+ error("for good");
+ }
+ Console.println("a");
+ } catch {
+ case _ => ();
+ }
+
class A {
private val result = {
val y = try { x } catch {
@@ -85,6 +102,8 @@ object Test extends AnyRef with Application {
try1;
try2;
try3;
+ try4;
+ try5;
Console.println;
new A();
()