Scala Programming Language
  1. Scala Programming Language
  2. SI-6375

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

    Details

      Description

      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 @(<annotation> @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.

        Activity

        Hide
        Eugene Burmako added a comment -
        Show
        Eugene Burmako added a comment - Related: https://issues.scala-lang.org/browse/SI-6325
        Show
        Paul Phillips added a comment - https://github.com/scala/scala/pull/1803
        Hide
        Paul Phillips added a comment -

        dc1b7d5

        Show
        Paul Phillips added a comment - dc1b7d5

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Eugene Burmako
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development