score:4

Accepted answer

This appears to be a bug in the library. Do you want to file the bug or shall I?

scala> Seq.empty  match {case Seq() => "yup"; case _ => "nope"}
res0: java.lang.String = yup

scala> Seq()  match {case Seq.empty => "yup"; case _ => "nope"}
res1: java.lang.String = yup

scala> ("" : Seq[Char]) match {case Seq() => "yup"; case _ => "nope"}    
res2: java.lang.String = yup

scala> ("" : Seq[Char]) match {case Seq.empty => "yup"; case _ => "nope"}
res3: java.lang.String = nope

score:0

In matching the unapply or unapplySeq functions are used, not apply as you seem to believe.


Related Query

More Query from same tag