summaryrefslogtreecommitdiff
path: root/test/files/pos/t2712-4.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t2712-4.scala')
-rw-r--r--test/files/pos/t2712-4.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/pos/t2712-4.scala b/test/files/pos/t2712-4.scala
new file mode 100644
index 0000000000..3e2e5cddae
--- /dev/null
+++ b/test/files/pos/t2712-4.scala
@@ -0,0 +1,17 @@
+package test
+
+object Test1 {
+ trait X
+ trait Y extends X
+ class Foo[T, U <: X]
+ def meh[M[_ <: A], A](x: M[A]): M[A] = x
+ meh(new Foo[Int, Y])
+}
+
+object Test2 {
+ trait X
+ trait Y extends X
+ class Foo[T, U >: Y]
+ def meh[M[_ >: A], A](x: M[A]): M[A] = x
+ meh(new Foo[Int, X])
+}