Skip to content

Annotations on abstract vals should emit a warning before they silently disappear #6375

Open
@scabug

Description

@scabug

Annotation on a val is by default added to the underlying field of a val.

If a val in question is abstract, there's no underlying field, so the annotation goes to waste. Writing @( @scala.annotation.meta.getter) would attach the annotation to the getter as desired, but it's not obvious.

Therefore I propose we emit a warning when an annotation is going to silently disappear.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions