From d81428a28723bade19dd6ebc977281dbb4be3f6d Mon Sep 17 00:00:00 2001 From: Burak Emir Date: Fri, 8 Sep 2006 09:47:16 +0000 Subject: throw exception in caseelements --- test/files/run/caseclasses.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/files/run') diff --git a/test/files/run/caseclasses.scala b/test/files/run/caseclasses.scala index 18455768ce..147b1cdd4e 100644 --- a/test/files/run/caseclasses.scala +++ b/test/files/run/caseclasses.scala @@ -9,5 +9,20 @@ object Test extends Application { case Foo(1) => System.out.println("OK") case Bar() => System.out.println("NO") } + + try { + Bar() caseElement 2 + throw new NullPointerException("duh") + } catch { + case x:IndexOutOfBoundsException => + } + + try { + f(2) caseElement 2 + throw new NullPointerException("duh") + } catch { + case x:IndexOutOfBoundsException => + } + } -- cgit v1.2.3