From c27e5f0d60c853868b3676f1449e42dd351b0644 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sat, 23 Jun 2012 22:38:23 +0200 Subject: SI-5968 Eliminate spurious exhaustiveness warning with singleton types. A singleton type is a type ripe for enumeration. --- test/files/pos/t5968.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/files/pos/t5968.scala (limited to 'test/files/pos/t5968.scala') 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 + } +} + -- cgit v1.2.3