You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala> object A { def unapplySeq(x: Int) = Some(collection.mutable.ArrayBuffer(1,2,3)) }
defined object A
scala> 1 match { case A(1, xs @ _*) => xs }
^
error: error during expansion of this match (this is a scalac bug).
The underlying error was: type mismatch;
found : scala.collection.mutable.ArrayBuffer[Int]
required: Seq[Int]
The reason here is that drop returns an ArrayBuffer. The interface for name-based pattern matching requires drop to return a scala.Seq.