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 2019/05/20 07:20:00 UTC

[jira] [Updated] (GROOVY-3791) [PARROT] Support Java Array initializer syntax when not ambiguous

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

Paul King updated GROOVY-3791:
------------------------------
    Summary: [PARROT] Support Java Array initializer syntax when not ambiguous  (was: Array initializer fails)

> [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
>             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
(v7.6.3#76005)