diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-06-25 02:20:24 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-06-25 02:20:24 -0700 |
commit | 1ef679bc18c7fd342bbc76865cfbf4a1c99fd035 (patch) | |
tree | 1bc7f4f9e6373633b71d8f089cff8214820bb106 /test | |
parent | f43de697595eaebcf2feec03beb95daf606ac678 (diff) | |
parent | c27e5f0d60c853868b3676f1449e42dd351b0644 (diff) | |
download | scala-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')
-rw-r--r-- | test/files/pos/t5968.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t5968.scala | 8 |
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 + } +} + |