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

annotations definition in groovy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.6-beta-1
    • 1.6-beta-2
    • None
    • None

    Description

      the following code can not execute properly, exceptions:
      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script12: 2: Constructor not permitted within an interface. at line: 2 column: 5. File: Script12 @ line 2, column 5.
      1 error

      it seems that the method hello has the same name with annotation hello and groovy mistake method hello as a constructor

      @interface hello {
          String hello()
      }
      
      println "test"
      

      Attachments

        Activity

          People

            paulk Paul King
            daniel_sun Daniel Sun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: