summaryrefslogtreecommitdiff
path: root/test/files/pos/t5968.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-06-23 22:38:23 +0200
committerJason Zaugg <jzaugg@gmail.com>2012-06-23 22:38:23 +0200
commitc27e5f0d60c853868b3676f1449e42dd351b0644 (patch)
treecc3cbfdace3e3960fa96fd9e5187525beeea3a53 /test/files/pos/t5968.scala
parente0761b4dcbbc3bcbebc6392faa91bf239d247ca0 (diff)
downloadscala-c27e5f0d60c853868b3676f1449e42dd351b0644.tar.gz
scala-c27e5f0d60c853868b3676f1449e42dd351b0644.tar.bz2
scala-c27e5f0d60c853868b3676f1449e42dd351b0644.zip
SI-5968 Eliminate spurious exhaustiveness warning with singleton types.
A singleton type is a type ripe for enumeration.
Diffstat (limited to 'test/files/pos/t5968.scala')
-rw-r--r--test/files/pos/t5968.scala8
1 files changed, 8 insertions, 0 deletions
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
+ }
+}
+