From b9785280a7138a2bb52060faf94807aa0d07dec1 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 24 Aug 2011 17:11:55 +0000 Subject: Renamed tests named bugXXX to tXXX, no review. --- test/files/run/t1048.scala | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/files/run/t1048.scala (limited to 'test/files/run/t1048.scala') diff --git a/test/files/run/t1048.scala b/test/files/run/t1048.scala new file mode 100644 index 0000000000..5eaeaa25c6 --- /dev/null +++ b/test/files/run/t1048.scala @@ -0,0 +1,21 @@ +final case class W[A](v: A) + +object E { + def unapply(w: W[Any]): Option[Any] = None +} + +object Bug { + def bug[A](e: Either[W[_], A]) = e match { + case Left(E(x)) => 1 + case Right(x) => 2 + case _ => 3 + } +} + +object Test { + def main(args: Array[String]): Unit = { + println(Bug.bug(Left(W(5)))) + println(Bug.bug(Right(5))) + } +} + -- cgit v1.2.3