Skip to content

Scope leak check produces false positive when using type lambda in a private type alias #12353

@nigredo-tori

Description

@nigredo-tori

reproduction steps

Using Scala 2.13.5,

object foo {
  private class Bar
  // error: private class Bar escapes its defining scope as part of type foo.this.Bar
  private type Baz = ({ type X = Bar})#X
}

problem

Baz is private, so Bar does not escape its defining scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessfixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions