[
https://issues.apache.org/jira/browse/GROOVY-1588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-1588:
--------------------------------
Fix Version/s: 3.0.0
> Better error messages when using Java's array init syntax
> ---------------------------------------------------------
>
> Key: GROOVY-1588
> URL: https://issues.apache.org/jira/browse/GROOVY-1588
> Project: Groovy
> Issue Type: Sub-task
> Components: parser-antlr2
> Affects Versions: 1.1-rc-3
> Reporter: Martin C. Martin
> Assignee: Daniel Sun
> Priority: Minor
> Fix For: 2.6.0-alpha-1, 3.0.0
>
>
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)