diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2008-02-04 18:51:54 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2008-02-04 18:51:54 +0000 |
commit | 87609b42414616a3ec1f0f2f2007f3061fa7f886 (patch) | |
tree | 3d5a8a45fe207e13f18f4d46911aa7ce5050b519 /test/files/run/structural.scala | |
parent | 644350e3ca3e3298de932d08affbe4b8ed69cc3e (diff) | |
download | scala-87609b42414616a3ec1f0f2f2007f3061fa7f886.tar.gz scala-87609b42414616a3ec1f0f2f2007f3061fa7f886.tar.bz2 scala-87609b42414616a3ec1f0f2f2007f3061fa7f886.zip |
Fixed issues #328 and #403.
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 } |