You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/05/16 11:03:04 UTC
[jira] [Resolved] (GROOVY-1588) Better error messages when using
Java's array init syntax
[ https://issues.apache.org/jira/browse/GROOVY-1588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King resolved GROOVY-1588.
-------------------------------
Resolution: Fixed
Assignee: Daniel Sun
Fix Version/s: (was: 4.x)
2.6.0-alpha-1
Fixed in Parrot
> 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
(v6.3.15#6346)