Skip to content

Collective extension methods drop annotations #7569

Closed
@bishabosha

Description

@bishabosha

minimized code

given fooOps: [A](a: A) with

  @nonsense
  def foo = ???

expectation

Either an error that annotations are not accepted in this position, or a type error because nonsense can't be found

notes

the parser accepts the annotation, as seen by output with Xprint:parser:

parsed:
package <empty> {
  given object fooOps[A](a: A) {
    @nonsense() def foo = ???
  }
}

but it is dropped by the end of frontend

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