Open
Description
Compiler version
3.1.2-RC1-bin-20211027-435207d-NIGHTLY
Minimized code
val qs = Seq(2, 3)
Seq(1, 2, 3) match
case Seq(b, `qs`: _*) => println("matched")
case Seq(b, vs: _*) => println("missed")
Output
case Seq(b, `qs`: _*) => println("matched")
^^^^
Found: (qs : Seq[Int])
Required: Int
Expectation
Work the same as
val q = 2
Seq(1, 2) match
case Seq(b, `q`) => println("matched")
case Seq(b, p) => println("missed")