Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.4
    • Fix Version/s: 2.6.0-alpha-1
    • Component/s: syntax
    • Labels:
      None

      Description

      Run the attached one line file and you get:

      ================================================================
      C:\Temp>groovyc arrayInitializer.groovy
      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed,
      arrayInitializer.groovy: 3: No expression for the array constructor call at line
      : 3 column: 29. File: arrayInitializer.groovy @ line 3, column 29.
      String[] junk = new String[]

      {"xxx"}

      ;
      ^

      1 error

      =================================================================

      Of course the line is perfectly correct. Try the attached java file which is an exact
      copy of the groovy file. It compiles fine.

        Attachments

        1. arrayInitializer.groovy
          0.1 kB
          Steve Buroff
        2. ArrayInitializer.java
          0.1 kB
          Steve Buroff

          Issue Links

            Activity

              People

              • Assignee:
                daniel_sun Daniel Sun
                Reporter:
                hermit69 Steve Buroff
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: