We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a5eb2b commit 49b6029Copy full SHA for 49b6029
tests/pos/i2989.scala
@@ -0,0 +1,12 @@
1
+class Foo[+X[_]] {
2
+ // OK
3
+ def foo1[Y[_]](right: Foo[Y]): Foo[Y] = right
4
5
+ def foo2[Y[_]](right: Foo[[T] => Y[T]]): Foo[Y] = right
6
7
+ def foo3[Y[_]](right: Foo[[T] => Y[T]]): Foo[[T] => Y[T]] = right
8
+ // Error:
9
+ // found: Foo[Y](right)
10
+ // required: Foo[Y]
11
+ def foo4[Y[_]](right: Foo[Y]): Foo[[T] => Y[T]] = right
12
+}
0 commit comments