From 5816ef2f97fe9bc574cc77dc48b20bc1c615eaf5 Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Wed, 30 Sep 2009 15:39:36 +0000 Subject: Fixed 'finally'. --- test/files/run/finally.scala | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/files/run/finally.scala (limited to 'test/files/run/finally.scala') 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) + } +} -- cgit v1.2.3