On 24.01.2017 10:54, Remi Forax wrote:
Also note that in Java
Integer[] o = { 3 }; and int[] o = { 3 };
both work but
Object o = { 3 };
does not compile because the syntax '{' '}' with no explicit array type
do inference (and here Object is not an array so the inference fails).
Supporti
49.n5.nabble.com/About-array-initializer-of-Java-style-for-Groovy-3-tp5737941p5737953.html
Sent from the Groovy Dev mailing list archive at Nabble.com.
initialization seems to be the right choice !
Rémi
> De: "Daniel Sun"
> À: d...@groovy.incubator.apache.org
> Envoyé: Mardi 24 Janvier 2017 10:42:03
> Objet: Re: About array initializer of Java style for Groovy 3
> +1
> 在 "Guillaume Laforge [via Groovy]&
Java too.
This is the initial implementation :)
https://github.com/danielsun1106/groovy-parser/commit/96e6c923a4d09d48448f8731a314c918ee6c0e7c
Cheers,
Daniel.Sun
--
View this message in context:
http://groovy.329449.n5.nabble.com/About-array-initializer-of-Java-style-for-Groovy-3-tp57379
but it can not
>> parse
>> `{1, 2, 3}`, which is not supported by Java too.
>>
>>This is the initial implementation :)
>> https://github.com/danielsun1106/groovy-parser/commit/
>> 96e6c923a4d09d48448f8731a314c918ee6c0e7c
>>
>>
>> Cheers,
;>
>>
>> Cheers,
>> Daniel.Sun
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://groovy.329449.n5.nabble.com/About-array-initializer-of-Java-style-for-Groovy-3-tp5737941p5737944.html
>> Sent from the Groov
n context:
http://groovy.329449.n5.nabble.com/About-array-initializer-of-Java-style-for-Groovy-3-tp5737941p5737944.html
Sent from the Groovy Dev mailing list archive at Nabble.com.
--
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud
49.n5.nabble.com/About-array-initializer-of-Java-style-for-Groovy-3-tp5737941p5737944.html
Sent from the Groovy Dev mailing list archive at Nabble.com.
--
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform
Blog: http://glaforge.appspot.co
;
>This is the initial implementation :)
> https://github.com/danielsun1106/groovy-parser/commit/
> 96e6c923a4d09d48448f8731a314c918ee6c0e7c
>
>
> Cheers,
> Daniel.Sun
>
>
>
>
> --
> View this message in context: http://groovy.329449.n5.
> nabble.
--
View this message in context:
http://groovy.329449.n5.nabble.com/About-array-initializer-of-Java-style-for-Groovy-3-tp5737941p5737944.html
Sent from the Groovy Dev mailing list archive at Nabble.com.
llo(), world() }`, etc. I plan to
> add this syntax for Groovy 3 to improve the compatibility between Groovy
> and
> Java.
>
>Any thoughts?
>
> Cheers,
> Daniel.Sun
>
>
>
> --
> View this message in context: http://groovy.329449.n5.
> nabble.com/Abou
this message in context:
http://groovy.329449.n5.nabble.com/About-array-initializer-of-Java-style-for-Groovy-3-tp5737941.html
Sent from the Groovy Dev mailing list archive at Nabble.com.
12 matches
Mail list logo