[
https://issues.apache.org/jira/browse/GROOVY-3791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-3791:
--------------------------------
Labels: arrays (was: )
> [PARROT] Support Java Array initializer syntax when not ambiguous
> -----------------------------------------------------------------
>
> Key: GROOVY-3791
> URL: https://issues.apache.org/jira/browse/GROOVY-3791
> Project: Groovy
> Issue Type: New Feature
> Components: syntax
> Affects Versions: 1.6.4
> Reporter: Steve Buroff
> Assignee: Daniel Sun
> Priority: Minor
> Labels: arrays
> Fix For: 3.0.0-alpha-1, 2.6.0-alpha-1
>
> Attachments: ArrayInitializer.java, arrayInitializer.groovy
>
>
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)