summaryrefslogtreecommitdiff
path: root/test/files/run/t8925.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-02-02 11:13:23 +1000
committerJason Zaugg <jzaugg@gmail.com>2015-02-02 11:13:23 +1000
commit70f960cfd1d43ee1b873c22a471c8350a966b2a7 (patch)
tree99be5b41a9b55236ef2abb9e6978a90eb12184a8 /test/files/run/t8925.scala
parent8b5f2b435b4b14089806406c8923f7e845d10ef6 (diff)
parent41766537c03e5ed953cc806c2a8629b115097996 (diff)
downloadscala-70f960cfd1d43ee1b873c22a471c8350a966b2a7.tar.gz
scala-70f960cfd1d43ee1b873c22a471c8350a966b2a7.tar.bz2
scala-70f960cfd1d43ee1b873c22a471c8350a966b2a7.zip
Merge pull request #4272 from retronym/merge/2.11.x-to-2.12.x-20150129
Merge 2.11.x to 2.12.x
Diffstat (limited to 'test/files/run/t8925.scala')
-rw-r--r--test/files/run/t8925.scala31
1 files changed, 31 insertions, 0 deletions
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)
+}