summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-06-25 02:20:24 -0700
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-06-25 02:20:24 -0700
commit1ef679bc18c7fd342bbc76865cfbf4a1c99fd035 (patch)
tree1bc7f4f9e6373633b71d8f089cff8214820bb106 /test/files
parentf43de697595eaebcf2feec03beb95daf606ac678 (diff)
parentc27e5f0d60c853868b3676f1449e42dd351b0644 (diff)
downloadscala-1ef679bc18c7fd342bbc76865cfbf4a1c99fd035.tar.gz
scala-1ef679bc18c7fd342bbc76865cfbf4a1c99fd035.tar.bz2
scala-1ef679bc18c7fd342bbc76865cfbf4a1c99fd035.zip
Merge pull request #767 from retronym/ticket/5968
SI-5968 Eliminate spurious exhaustiveness warning with singleton types.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/pos/t5968.flags1
-rw-r--r--test/files/pos/t5968.scala8
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/pos/t5968.flags b/test/files/pos/t5968.flags
new file mode 100644
index 0000000000..e8fb65d50c
--- /dev/null
+++ b/test/files/pos/t5968.flags
@@ -0,0 +1 @@
+-Xfatal-warnings \ No newline at end of file
diff --git a/test/files/pos/t5968.scala b/test/files/pos/t5968.scala
new file mode 100644
index 0000000000..0093f84fc0
--- /dev/null
+++ b/test/files/pos/t5968.scala
@@ -0,0 +1,8 @@
+object X {
+ def f(e: Either[Int, X.type]) = e match {
+ case Left(i) => i
+ case Right(X) => 0
+ // SI-5986 spurious exhaustivity warning here
+ }
+}
+