Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
liufengyun committed Feb 23, 2018
1 parent 24841e1 commit 10db62e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 1 addition & 0 deletions tests/patmat/i4030.check
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9: Pattern Match Exhaustivity: (C4(), _), (_, C4())
9 changes: 0 additions & 9 deletions tests/pos/i4030.scala → tests/patmat/i4030.scala
Original file line number Diff line number Diff line change
@@ -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]())
}

0 comments on commit 10db62e

Please sign in to comment.