[
https://issues.apache.org/jira/browse/GROOVY-8551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16444094#comment-16444094
]
Eric Milles commented on GROOVY-8551:
-------------------------------------
My take on this is the case I noted is not ambiguous. There is an array
initializer (aka {{new String[][]}}) and within are dimension initializers. In
this context, how could these be confused for blocks or closures?
The form I included in my submission is how I would init a multi-dimensional
array without thinking about it. Having to do this is not worth the trouble:
{code:groovy}
def strings = new String[][] {
new String[] { "a", "b", "c" },
new String[] { "1", "2", "3" }
}
{code}
> Parrot Parser: support multi-dimensional array initializers
> -----------------------------------------------------------
>
> Key: GROOVY-8551
> URL: https://issues.apache.org/jira/browse/GROOVY-8551
> Project: Groovy
> Issue Type: Improvement
> Affects Versions: 2.6.0-alpha-3, 3.0.0-alpha-2
> Reporter: Eric Milles
> Assignee: Daniel Sun
> Priority: Minor
>
> GROOVY-3791 indicates support for Java-style array initializer is now
> supported by Parrot Parser. However, a compact multi-dimensional initializer
> still fails:
> {code:groovy}
> def strings = new String[][] { { "a", "b", "c" }, { "1", "2", "3" } }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)