Skip to content

Commit 49b6029

Browse files
committed
Add test case
1 parent 4a5eb2b commit 49b6029

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/pos/i2989.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Foo[+X[_]] {
2+
// OK
3+
def foo1[Y[_]](right: Foo[Y]): Foo[Y] = right
4+
// OK
5+
def foo2[Y[_]](right: Foo[[T] => Y[T]]): Foo[Y] = right
6+
// OK
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

Comments
 (0)