Re: [GEP] About supporting Java-Like array literal

2018-04-26 Thread Daniel Sun
Hi Paul, Here is the PR to make Groovy support java-like array: https://github.com/apache/groovy/pull/691 Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Re: [GEP] About supporting Java-Like array literal

2018-04-16 Thread Paul King
Well, it's fine to "refine it later" on the branch. I don't think we want it in master unless we exactly know what breaking changes like above might be involved. Cheers, Paul. On Mon, Apr 16, 2018 at 8:35 PM, Daniel Sun wrote: > Hi Paul, > > The Parrot parser on

Re: [GEP] About supporting Java-Like array literal

2018-04-16 Thread Daniel Sun
Hi Paul, The Parrot parser on the `phoenix` branch can handle nested array literals, but it parses it as list currently, we can refine it later ;-) ``` Closure[] y = { {-> 1 + 1 } } assert y[0].call().call() == 2 ``` > is the second ".call()" no longer needed? yes. Cheers,

Re: [GEP] About supporting Java-Like array literal

2018-04-16 Thread Paul King
The following examples, although a little strange, are currently supported in master: Closure[] x = { -> 1 + 1 } assert x[0].call() == 2 Closure[] y = { {-> 1 + 1 } } assert y[0].call().call() == 2 Are both supported in your branch or for the second example, is the second ".call()" no longer