Skip to content

Commit 10db62e

Browse files
committed
address review
1 parent 24841e1 commit 10db62e

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

tests/patmat/i4030.check

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9: Pattern Match Exhaustivity: (C4(), _), (_, C4())
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
sealed trait Root[T]
22
case object C1 extends Root[Int]
33
case object C2 extends Root[String]
4-
//case class C3[X, Y]() extends Root[X|Y|(X => X)]
54
case class C3[X, Y]() extends Root[(X => X)|(Y => Y)|(X => Y)]
65
case class C4[X, Y]() extends Root[(X => X)|(Y => Y)|(X => Y)]
76

87
object TestGADT {
9-
//type Foo // abstract
108

119
def f[A <: Seq[_], B, Foo >: A => B](v: Root[Foo], u: Root[Foo]) = (v, u) match {
12-
//case C1 =>
13-
//case C2 =>
1410
case (C3(), C3()) =>
1511
}
16-
//f(C3[Int, Int]())
17-
//implicitly[Int <:< Int|(Int => Int)]
18-
//implicitly[(Int => Int) <:< String|(Int => Int)]//($conforms[Int => Int])
19-
//f[Int, Int, Int|(Int => Int)](C3[Int, Int]())
20-
//f(C3[Int, Int]())
2112
f(C3[Seq[_], Long](), C4[Seq[_], Long]())
2213
}

0 commit comments

Comments
 (0)