Skip to content

Commit a83f019

Browse files
committed
Make custom version of the test
In dotty bootstapped the assert is inlined
1 parent 3385530 commit a83f019

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
File renamed without changes.

tests/pos/i2104b.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
case class Pair[A, B](_1: A, _2: B)
2+
3+
trait Cons[+H, +T]
4+
5+
object Cons {
6+
def apply[H, T](h: H, t: T): Cons[H, T] = ???
7+
def unapply[H, T](t: Cons[H, T]): Option[Pair[H, T]] = ???
8+
}
9+
10+
object Test {
11+
def main(args: Array[String]): Unit = {
12+
Cons(Option(1), None) match {
13+
case Cons(Some(i), None) =>
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)