I have the following case class:
case class Alert[T <: Transport](destination: Destination[T], message: Message[T])
In Scala 2.9.2, the following method signature has compiled fine:
def send(notification: Alert[_]) {
notification match {
...
}
}
Now in Scala 2.10.1 it fails to compile with the following error:
type arguments [_$1] do not conform to class Alert's type parameter bounds [T <: code.notifications.Transport]
Why is this? How can I fix the error? Simply giving the same type bounds to send
results in a lot more compile errors...
Update: Looking at SIP-18, I don't think the reason is that I don't have existential types enabled, as SIP-18 says it's only needed for non-wildcard types, which is exactly what I do have here.