summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-01-24 16:36:08 -0800
committerPaul Phillips <paulp@improving.org>2013-01-24 16:36:08 -0800
commita89669b117c629bb7686fb794f46c3027bacdb7e (patch)
tree0aac0560dbf0b262f5df813b9e26d3c51779bcbd /test/files/pos
parentedc9f123cac5b06894d50adfb61cc6cd1456eedb (diff)
parent8f498847020c5623559fa42d5d23e44fb74c8d22 (diff)
downloadscala-a89669b117c629bb7686fb794f46c3027bacdb7e.tar.gz
scala-a89669b117c629bb7686fb794f46c3027bacdb7e.tar.bz2
scala-a89669b117c629bb7686fb794f46c3027bacdb7e.zip
Merge pull request #1935 from retronym/ticket/6994
SI-6994 Avoid spurious promiscuous catch warning
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t6994.flags1
-rw-r--r--test/files/pos/t6994.scala8
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/pos/t6994.flags b/test/files/pos/t6994.flags
new file mode 100644
index 0000000000..e8fb65d50c
--- /dev/null
+++ b/test/files/pos/t6994.flags
@@ -0,0 +1 @@
+-Xfatal-warnings \ No newline at end of file
diff --git a/test/files/pos/t6994.scala b/test/files/pos/t6994.scala
new file mode 100644
index 0000000000..d707196423
--- /dev/null
+++ b/test/files/pos/t6994.scala
@@ -0,0 +1,8 @@
+object Test {
+ object NF {
+ def unapply(t: Throwable): Option[Throwable] = None
+ }
+ val x = (try { None } catch { case NF(ex) => None }) getOrElse 0
+ // Was emitting a spurious warning post typer:
+ // "This catches all Throwables. If this is really intended, use `case ex6 : Throwable` to clear this warning."
+}