blob: 48846a369c03a5220af77e4a9adbc508abcc3a71 (
plain) (
tree)
|
|
// Invalid because hk type parameters may not appear in lower bounds
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])
}
|