Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1-rc-3
    • Fix Version/s: 2.6.0-alpha-1
    • Component/s: parser-antlr
    • Labels:
      None

      Description

      Declaring and populating an array in line such as:

      Object[] objArr = new Object[]

      { "a", "b", "d" }

      ;

      causes the following exception:

      Exception in thread "main" org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, ModelNumberParser.groovy: 7: unexpected token: , @ line 7, column 45

      It would be better, especially for Java people just learning Groovy, to say something like "Java initialization syntax not supported, use [x, y, z] as DesiredClass[]."

      EDIT: probably filed against a JSR version.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                daniel_sun Daniel Sun
                Reporter:
                mcspanky Martin C. Martin
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: