Skip to content

Infinfite loop when returning anonymous higher kinded type #7602

Closed
@mwisnicki

Description

@mwisnicki

minimized code

type X[T] = ({ type F[_]; type R = F[T]})#R

expectation

This compiles in Scala 2.13 but fail in latest dotty with Recursion limit exceeded.

context

While it doesn't matter for this bug what I'm actually trying to define is

trait Monad[F[_]]
type of[M[_[_]], T] = ({ type F[_]; type R = (given M[F]) => F[T]})#R
def foo(a: Monad of String) = ???

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions