Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8940

Cannot create package-private annotation type

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.16
    • Fix Version/s: 2.5.8
    • Component/s: Compiler
    • Labels:
      None

      Description

      Java allows this:

      package foobar;
      @interface Java {
      }
      

      Groovy 2.4 fails for the equivalent:

      package foobar
      import groovy.transform.PackageScope
      @PackageScope @interface Groovy {
      }
      
      Annotation @groovy.transform.PackageScope is not allowed on element ANNOTATION
       @ line 3, column 1.
         @PackageScope @interface Groovy {
         ^
      

      NOTE: This works in Groovy 2.5, but it is not clear from the changelogs which change is responsible. Could the change that fixed be identified so I can try my hand at a minimal patch for 2.4?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              emilles Eric Milles
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: