Skip to content

parser incorrectly reports self type error for lambda in template #1424

Closed
@retronym

Description

@retronym
class Test {
  (x: Int) => x
}

sandbox/test.scala:2: error: not a legal self type clause (class dotty.tools.dotc.ast.untpd$Parens)
  (x: Int) => x
  ^
sandbox/test.scala:2: error: package x is not a value
  (x: Int) => x
   ^
sandbox/test.scala:2: error: package x is not a value
  (x: Int) => x
              ^
three errors found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions