diff options
Diffstat (limited to 'tests/pending/run/t1048.scala')
-rw-r--r-- | tests/pending/run/t1048.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/pending/run/t1048.scala b/tests/pending/run/t1048.scala new file mode 100644 index 000000000..5eaeaa25c --- /dev/null +++ b/tests/pending/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))) + } +} + |