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

scala-written ClassfileAnnotation argument name needs to be `value`

    Details

      Description

      if one extends from ClassfileAnnotation, the compiler is confused about the argument name - it expects it to be value:

      class annot(notValue: String) extends annotation.ClassfileAnnotation
      @annot("") class C
      

      gives

      error: unknown annotation argument name: value
      t5892.scala:2: error: annotation annot is missing argument notValue
      @annot("") class C
       ^
      

        Activity

        Hide
        Jason Zaugg added a comment -

        @Lukas: is this what you had in mind?

        https://github.com/retronym/scala/compare/scala:2.10.x...retronym:ticket/6082

        Or do you propose that we lift the "classfile annotation arguments must be named" restriction for Scala defined classfile annotations (which are pretty useless at the moment...)

        Show
        Jason Zaugg added a comment - @Lukas: is this what you had in mind? https://github.com/retronym/scala/compare/scala:2.10.x...retronym:ticket/6082 Or do you propose that we lift the "classfile annotation arguments must be named" restriction for Scala defined classfile annotations (which are pretty useless at the moment...)
        Hide
        Lukas Rytz added a comment -

        I think that solution is what makes the most sense given the current situation. Thanks!

        Show
        Lukas Rytz added a comment - I think that solution is what makes the most sense given the current situation. Thanks!
        Show
        Jason Zaugg added a comment - https://github.com/scala/scala/pull/1894

          People

          • Assignee:
            Jason Zaugg
            Reporter:
            Lukas Rytz
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development