Skip to content

given instance parameters cannot appear in the type of a member of the instance #8397

Closed
@smarter

Description

@smarter

minimized code

given foo(using x: Int) as AnyRef:
  type T = x.type

Compilation output

non-private type T in class foo refers to private value x
in its type signature  = (foo.this.x : Int)

expectation

This could compile if x was desugared to a public val in foo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:desugarDesugaring happens after parsing but before typing, see desugar.scalaitype:bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions