Skip to content

Commit 69b884d

Browse files
Add test for the generic tuples as result types of unapplySeq
1 parent 51362d8 commit 69b884d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/run/i11008b.check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Many 3 characters List(f, o, o)

tests/run/i11008b.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
object Foo:
2+
def unapplySeq(x: String): Int *: Seq[String] *: EmptyTuple = (x.length, x.toList.map(_.toString))
3+
4+
@main def Test =
5+
"foo" match
6+
case Foo(1, c) => println("One character " + c)
7+
case Foo(x, xs*) => println(s"Many $x characters $xs")

0 commit comments

Comments
 (0)