diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2009-10-01 13:22:18 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2009-10-01 13:22:18 +0000 |
commit | e5b199ebb9636a0033e1b7fd56a1920e5ffffc29 (patch) | |
tree | 7e798c695ea2b9d23973a01083c85caff921dd02 /test | |
parent | 51771ed4641111662d32900a1ac84264dbdad0e7 (diff) | |
download | scala-e5b199ebb9636a0033e1b7fd56a1920e5ffffc29.tar.gz scala-e5b199ebb9636a0033e1b7fd56a1920e5ffffc29.tar.bz2 scala-e5b199ebb9636a0033e1b7fd56a1920e5ffffc29.zip |
Fixed #2392
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/finally.check | 3 | ||||
-rw-r--r-- | test/files/run/finally.scala | 22 |
2 files changed, 25 insertions, 0 deletions
diff --git a/test/files/run/finally.check b/test/files/run/finally.check new file mode 100644 index 0000000000..4e66e2b5cb --- /dev/null +++ b/test/files/run/finally.check @@ -0,0 +1,3 @@ +hi +In Finally +java.lang.RuntimeException: ouch 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) + } +} |