Skip to content

Commit e08cb77

Browse files
committed
Add tests
1 parent 67363b5 commit e08cb77

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

tests/pos/i6849a.scala

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
final class Foo(val value: Int)
2+
3+
object Foo {
4+
def unapplySeq(foo: Foo): Seq[Int] = List(foo.value)
5+
}
6+
7+
object Test {
8+
def main(args: Array[String]): Unit = {
9+
(new Foo(3)) match {
10+
case Foo(x, _: _*) =>
11+
assert(x == 3)
12+
}
13+
}
14+
}

tests/pos/i6849b.scala

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
object A {
2+
def unapplySeq(a: Any): Seq[_] = ""
3+
}
4+
5+
def unapply(x: Any) = x match { case A() => }

0 commit comments

Comments
 (0)