summaryrefslogtreecommitdiff
path: root/test/files/run/exceptions-2.scala
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2008-02-26 08:12:56 +0000
committerIulian Dragos <jaguarul@gmail.com>2008-02-26 08:12:56 +0000
commitbcbeab74566f835219dabf0bbb172fd028a8a032 (patch)
treeb83d917d906ec690efbb01f2fdf80e32312c3de4 /test/files/run/exceptions-2.scala
parent0c6ab69119308a4248e416ce325d1a9e1c649516 (diff)
downloadscala-bcbeab74566f835219dabf0bbb172fd028a8a032.tar.gz
scala-bcbeab74566f835219dabf0bbb172fd028a8a032.tar.bz2
scala-bcbeab74566f835219dabf0bbb172fd028a8a032.zip
Fixed #466.
Diffstat (limited to 'test/files/run/exceptions-2.scala')
-rw-r--r--test/files/run/exceptions-2.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/files/run/exceptions-2.scala b/test/files/run/exceptions-2.scala
index 1c6245b891..91d294c8d7 100644
--- a/test/files/run/exceptions-2.scala
+++ b/test/files/run/exceptions-2.scala
@@ -255,6 +255,21 @@ object Test {
}
+ def returnWithFinallyClean: Int = try {
+ try {
+ Console.println("Normal execution...");
+ return 10
+ Console.println("non reachable code");
+ 11
+ } finally {
+ Console.println("inner finally");
+ }
+ } finally {
+ Console.println("Outer finally");
+ try { 1 } catch { case e: java.io.IOException => () }
+ }
+
+
def main(args: Array[String]): Unit = {
Console.println("nested1: ");
execute(nested1);
@@ -310,5 +325,8 @@ object Test {
Console.println("Throw in catch and finally:");
execute(tryThrowFinally);
+
+ Console.println("Return with finally clause that cleans the stack")
+ returnWithFinallyClean
}
}