[ 
https://issues.apache.org/jira/browse/GROOVY-1588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King closed GROOVY-1588.
-----------------------------

> 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-antlr
>    Affects Versions: 1.1-rc-3
>            Reporter: Martin C. Martin
>            Assignee: Daniel Sun
>            Priority: Minor
>             Fix For: 2.6.0-alpha-1
>
>
> 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
(v7.6.3#76005)

Reply via email to