summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-11-18 16:40:30 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-11-18 16:40:30 +1000
commit965d7b9ef8b813d8209a8a8bc2ba2dc14a0a4f43 (patch)
tree251091517199868501c965ab369d59f4ecc6f3f2 /test/files
parent3513a324b0393e4da38068c0ceffe79927cac46e (diff)
parent42aff37076747c5b63a8cae073deb9c4930d8f7a (diff)
downloadscala-965d7b9ef8b813d8209a8a8bc2ba2dc14a0a4f43.tar.gz
scala-965d7b9ef8b813d8209a8a8bc2ba2dc14a0a4f43.tar.bz2
scala-965d7b9ef8b813d8209a8a8bc2ba2dc14a0a4f43.zip
Merge pull request #4068 from lrytz/t8925
SI-8925, SI-7407 test cases, fixed in new backend
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/t7407.flags2
-rw-r--r--test/files/run/t8925.check2
-rw-r--r--test/files/run/t8925.flags1
-rw-r--r--test/files/run/t8925.scala31
4 files changed, 35 insertions, 1 deletions
diff --git a/test/files/run/t7407.flags b/test/files/run/t7407.flags
index c8547a27dc..be4ef0798a 100644
--- a/test/files/run/t7407.flags
+++ b/test/files/run/t7407.flags
@@ -1 +1 @@
--Ynooptimise -Ybackend:GenBCode
+-Ynooptimise -Yopt:l:none -Ybackend:GenBCode
diff --git a/test/files/run/t8925.check b/test/files/run/t8925.check
new file mode 100644
index 0000000000..112e7005df
--- /dev/null
+++ b/test/files/run/t8925.check
@@ -0,0 +1,2 @@
+bar
+abcd
diff --git a/test/files/run/t8925.flags b/test/files/run/t8925.flags
new file mode 100644
index 0000000000..be4ef0798a
--- /dev/null
+++ b/test/files/run/t8925.flags
@@ -0,0 +1 @@
+-Ynooptimise -Yopt:l:none -Ybackend:GenBCode
diff --git a/test/files/run/t8925.scala b/test/files/run/t8925.scala
new file mode 100644
index 0000000000..33f4505f03
--- /dev/null
+++ b/test/files/run/t8925.scala
@@ -0,0 +1,31 @@
+object Ex {
+ def unapply(t: Throwable): Option[Throwable] = Some(t)
+}
+
+class A {
+ var x = ""
+
+ def bar =
+ try {
+ "bar"
+ } finally {
+ try {
+ x += "a"
+ } finally {
+ x += "b"
+ try {
+ x += "c"
+ throw null
+ } catch {
+ case Ex(_) =>
+ x += "d"
+ }
+ }
+ }
+}
+
+object Test extends App {
+ val a = new A
+ println(a.bar)
+ println(a.x)
+}