aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/t7039.scala
blob: 869d3f36994d39fb888fc5dec5f4e22cb6bb9759 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
object UnapplySeqTest {
  def unapplySeq(any: Any): Option[(Int, Seq[Int])] = Some((5, List(1)))
}

object Test extends dotty.runtime.LegacyApp {
  null match {
    case UnapplySeqTest(5) => println("uh-oh")
    case UnapplySeqTest(5, 1) => println("Matched!") // compiles
    case UnapplySeqTest(5, xs : _*) => println("toooo long: "+ (xs: Seq[Int]))
  }
}