diff options
Diffstat (limited to 'test/files/run/structural.scala')
-rw-r--r-- | test/files/run/structural.scala | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/structural.scala b/test/files/run/structural.scala index 6ced0e569a..d6b2b3d09f 100644 --- a/test/files/run/structural.scala +++ b/test/files/run/structural.scala @@ -150,7 +150,29 @@ object test2 { x5.f() } +object test3 { + + case class Exc extends Exception + + object Rec { + def f = throw Exc() + } + + def m(r: { def f: Nothing }) = + try { + r.f + } + catch { + case e: Exc => println("caught") + case e => println(e) + } + + m(Rec) + +} + object Test extends Application { test1 test2 + test3 } |