My sbt is showing a warning message
non-variable type argument String in type pattern List[String] (the underlying of List[String]) is unchecked since it is eliminated by erasure
I tried the answer given in the link (first solution)
Erasure elimination in scala : non-variable type argument is unchecked since it is eliminated by erasure
Here is my code
case class ListStrings(values:scala.List[String]) { }
def matchValue(value: Any) = {
value match {
case ListStrings(xs) =>
val userList = xs
case _ => log.error("unknown value")
}
}
val list: List[String] = List("6","7","8")
matchValue(list)
I am getting "unknown value" as an output why its not matching ? what i am missing here?