summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2010-08-10 11:46:49 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2010-08-10 11:46:49 +0000
commit1809c97bb34c230d2f2eecb6c1a2269ca79480e9 (patch)
tree31ed0f408520382924574636cb2cf43cdcf5f7d6 /test/files/run
parentca0bb2c4191ff9cd7b1c5f0f8315a4db65785519 (diff)
downloadscala-1809c97bb34c230d2f2eecb6c1a2269ca79480e9.tar.gz
scala-1809c97bb34c230d2f2eecb6c1a2269ca79480e9.tar.bz2
scala-1809c97bb34c230d2f2eecb6c1a2269ca79480e9.zip
fix an msil bug (code gen of exception handlers).
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/exceptions-nest.check1
-rw-r--r--test/files/run/exceptions-nest.scala18
2 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/exceptions-nest.check b/test/files/run/exceptions-nest.check
index ae66da0a99..48725e4d27 100644
--- a/test/files/run/exceptions-nest.check
+++ b/test/files/run/exceptions-nest.check
@@ -10,3 +10,4 @@ OK
10
1
()
+10
diff --git a/test/files/run/exceptions-nest.scala b/test/files/run/exceptions-nest.scala
index 40b00988e4..d3f37452b5 100644
--- a/test/files/run/exceptions-nest.scala
+++ b/test/files/run/exceptions-nest.scala
@@ -11,6 +11,7 @@ object Test extends Application {
println(test9)
println(test10)
println(test11)
+ println(test12)
def test1 = {
var x = 1
@@ -136,4 +137,21 @@ object Test extends Application {
try { () }
catch { case e => () }
}
+
+ class E1 extends Exception
+ class E2 extends Exception
+ class E3 extends Exception
+
+ def test12_impl(op: => Int) = try {
+ op
+ } catch {
+ case e: E1 => 2
+ case e: E2 => 3
+ case e: E3 => 4
+ }
+ def test12 =
+ test12_impl(1) +
+ test12_impl(throw new E1) +
+ test12_impl(throw new E2) +
+ test12_impl(throw new E3)
}