Skip to content

Multilevel type lambdas is not supported #6451

Closed
@newca12

Description

@newca12

This was initially reported on the dotty gitter channel by @sorenbug but I did not find an open issue for that.

Level 1 is OK

scala> type Z = [Z[_]] => [T] => Z[T]
// defined alias type Z = [Z <: [_$109] => Any] => [T] => Z[T]

scala> val l: Z[List][Int] = List(1)
val l: Z[List][Int] = List(1)

but not level 2 and more

scala> type YZ = [Y[_]] => [Z[_]] => [T] => Y[Z[T]]
// defined alias type YZ = [Y <: [_$8] => Any] => [Z <: [_$9] => Any] => [T] => Y[Z[T]]

scala> val l: YZ[List][List][Int] = List(List(1))
1 |val l: YZ[List][List][Int] = List(List(1))
  |                              ^^^^^^^^^^^^^
  |                              Found:    List[List[Int]]
  |                              Required: YZ[List][List][Int]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions