Skip to content

Dependent function types: self.type and this.type not the same #6745

@b-studios

Description

@b-studios

minimized code

trait Foo { self =>
  type M
  def apply(prog: (h: self.type) => h.M): M = prog(this)
}

expectation

The above code example type checks. When replacing self.type with this.type I am getting the following error:

type M is not a member of <refinement>

However, I expect self.type and this.type to be the same.

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