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

Annotations on annotation methods are missing in the AST

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 4.0.0-alpha-1, 3.0.2
    • Component/s: ast builder
    • Labels:
      None

      Description

      In Groovy 2.5, the annotation would be found, in Groovy 3 it is not.

       

       Simple example:

       

      import org.codehaus.groovy.ast.builder.AstBuilder
      import org.codehaus.groovy.ast.*

      ASTNode[] nodes = new AstBuilder().buildFromString('''
      @interface Foo {
          String value() default ""
      }

      @interface Bar {

          @Foo
          String value()
      }
      ''')

       

      nodes[2].methods[0].getAnnotations()

        Attachments

          Activity

            People

            • Assignee:
              daniel_sun Daniel Sun
              Reporter:
              Schlogen James Kleeh
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: