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 is compiled:
def send(notification: Alert[_]) { notification match { ... } }
Now in Scala 2.10.1, it cannot compile with the following error:
type arguments [_$1] do not conform to class Alert type parameter bounds [T <: code.notifications.Transport]
Why is this? How can I fix the error? Simply assigning the same send types results in much larger compilation errors ...
Update: Looking at SIP-18 , I donβt think the reason is that I do not have existential types, as SIP-18 says that this is only necessary for types without wildcards, which is what I have here .
source share