I wrote the following code:
class MyActor extends Actor {
override def receive: Receive = {
case p: Set[String] => //
}
}
But when compiling the following warning is emitted:
Warning:(22, 13) non-variable type argument String in type pattern
scala.collection.immutable.Set[String] (the underlying of Set[String])
is unchecked since it is eliminated by erasure
case p: Set[String] =>
Why? Is there a way to get rid of it except supressing?