diff --git a/tests/patmat/i4030.check b/tests/patmat/i4030.check new file mode 100644 index 000000000000..e9b6baf83846 --- /dev/null +++ b/tests/patmat/i4030.check @@ -0,0 +1 @@ +9: Pattern Match Exhaustivity: (C4(), _), (_, C4()) diff --git a/tests/pos/i4030.scala b/tests/patmat/i4030.scala similarity index 55% rename from tests/pos/i4030.scala rename to tests/patmat/i4030.scala index 6da08002fcad..65a10f24d30d 100644 --- a/tests/pos/i4030.scala +++ b/tests/patmat/i4030.scala @@ -1,22 +1,13 @@ sealed trait Root[T] case object C1 extends Root[Int] case object C2 extends Root[String] -//case class C3[X, Y]() extends Root[X|Y|(X => X)] case class C3[X, Y]() extends Root[(X => X)|(Y => Y)|(X => Y)] case class C4[X, Y]() extends Root[(X => X)|(Y => Y)|(X => Y)] object TestGADT { - //type Foo // abstract def f[A <: Seq[_], B, Foo >: A => B](v: Root[Foo], u: Root[Foo]) = (v, u) match { - //case C1 => - //case C2 => case (C3(), C3()) => } - //f(C3[Int, Int]()) - //implicitly[Int <:< Int|(Int => Int)] - //implicitly[(Int => Int) <:< String|(Int => Int)]//($conforms[Int => Int]) - //f[Int, Int, Int|(Int => Int)](C3[Int, Int]()) - //f(C3[Int, Int]()) f(C3[Seq[_], Long](), C4[Seq[_], Long]()) }