我在 scala 函数中有以下模式匹配案例:
def someFunction(sequences: Iterable[Seq[Int]]):Seq[Int] = sequences match{
case Seq() => Seq(1)
case _ => ...
...
}
我收到以下警告:
warning: non variable type-argument A in type pattern Seq[A] is unchecked since it is eliminated by erasure
case Seq(_) => Seq(1)
^
one warning found
这是什么意思?