Skip to content

HK type parameterY not considered a subtype of [T] => Y[T] in some situations #2989

@smarter

Description

@smarter
class Foo[+X[_]] {
  // OK
  def foo1[Y[_]](right: Foo[Y]): Foo[Y] = right
  // OK
  def foo2[Y[_]](right: Foo[[T] => Y[T]]): Foo[Y] = right
  // OK
  def foo3[Y[_]](right: Foo[[T] => Y[T]]): Foo[[T] => Y[T]] = right
  // Error:
  //   found:    Foo[Y](right)
  //   required: Foo[Y]
  def foo4[Y[_]](right: Foo[Y]): Foo[[T] => Y[T]] = right
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions