summaryrefslogtreecommitdiff
path: root/test/files/run/t7039.scala
blob: 475c4ae267d5a9db525d4931976336f47ef21cc6 (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 App {
  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]))
  }
}