diff options
Diffstat (limited to 'tests/invalid/pos/t4553.scala')
-rw-r--r-- | tests/invalid/pos/t4553.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/invalid/pos/t4553.scala b/tests/invalid/pos/t4553.scala new file mode 100644 index 000000000..48846a369 --- /dev/null +++ b/tests/invalid/pos/t4553.scala @@ -0,0 +1,12 @@ +// 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]) +} |