blob: e9bef409942840a078de8eccf67b387eed166de2 (
plain) (
tree)
|
|
trait VectorLike[+T, +V[A] <: Vector[A]] {
def +[S, VResult[S] >: V[S]](v: VResult[S]): Unit
}
trait Vector[+T] extends VectorLike[T, Vector]
trait ImmutableVector[T] extends Vector[T] with VectorLike[T, ImmutableVector]
trait MutableVector[T] extends Vector[T] with VectorLike[T, MutableVector]
object Test {
def f = (null: MutableVector[Int]) + (null: ImmutableVector[Int])
}
|