summaryrefslogtreecommitdiff
path: root/test/files/run/finally.scala
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2009-09-30 15:39:36 +0000
committerIulian Dragos <jaguarul@gmail.com>2009-09-30 15:39:36 +0000
commit5816ef2f97fe9bc574cc77dc48b20bc1c615eaf5 (patch)
treee46cc0c10e7cae9ae59c26959e11c11b42c7d59a /test/files/run/finally.scala
parent3a4aa69fbe519d0ffcfef5beeaea6d67d0993a80 (diff)
downloadscala-5816ef2f97fe9bc574cc77dc48b20bc1c615eaf5.tar.gz
scala-5816ef2f97fe9bc574cc77dc48b20bc1c615eaf5.tar.bz2
scala-5816ef2f97fe9bc574cc77dc48b20bc1c615eaf5.zip
Fixed 'finally'.
Diffstat (limited to 'test/files/run/finally.scala')
-rw-r--r--test/files/run/finally.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/finally.scala b/test/files/run/finally.scala
new file mode 100644
index 0000000000..6d8d360d30
--- /dev/null
+++ b/test/files/run/finally.scala
@@ -0,0 +1,22 @@
+
+// test that finally is not covered by any exception handlers.
+object Test extends Application {
+ def bar {
+ try {
+ println("hi")
+ }
+ catch {
+ case e => println("GOT HERE")
+ }
+ finally {
+ println("In Finally")
+ throw new RuntimeException("ouch")
+ }
+ }
+
+ try {
+ bar
+ } catch {
+ case e => println(e)
+ }
+}