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

Parsing quoted method name fails if there is no modifier

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.2
    • None
    • None
    • Ubuntu 6.06 LTS Dapper Drake, JDK 1.5.0_05, Groovy Revision 3983

    Description

      The script:

      class stringMethodName {
      Integer 'flob' ( ) {
      }
      }

      fails with the message:

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, stringMethodName.groovy: 2: unexpected token: Integer @ line 2, column 3.
      Integer 'flob' ( ) {
      ^

      1 error

      If any combination of modifiers is put before the Integer, for example:

      class stringMethodName {
      public Integer 'flob' ( ) {
      }
      }

      then compilation is successful.

      Attachments

        Activity

          People

            paulk Paul King
            russel Dr. Russel Winder
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: