summaryrefslogtreecommitdiff
path: root/test/files/run/t9806.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t9806.scala')
-rw-r--r--test/files/run/t9806.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/files/run/t9806.scala b/test/files/run/t9806.scala
new file mode 100644
index 0000000000..ccde989efe
--- /dev/null
+++ b/test/files/run/t9806.scala
@@ -0,0 +1,18 @@
+object Ex extends Exception
+object Test {
+ def main(args: Array[String]) {
+ try foo catch { case Ex => }
+ }
+
+ def isTrue(b: Boolean) = b
+ def foo = {
+ var streamErrors1 = true
+ try {
+ streamErrors1 = false
+ throw Ex
+ } catch {
+ case ex if streamErrors1 =>
+ assert(isTrue(streamErrors1))
+ }
+ }
+}