Re: Synthetic GroovyObject methods

2018-03-09 Thread Daniel.Sun
Hi Daniil, Maybe Jochen can tell us the reason. Ping Jochen ;-) Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Re: [GEP] Switch expressions syntax from Java 11 or 12 (perhaps)

2018-03-09 Thread forax
- Mail original - > De: "MG" > À: "dev" , "Remi Forax" > Envoyé: Jeudi 8 Mars 2018 23:55:11 > Objet: Re: [GEP] Switch expressions syntax from Java 11 or 12 (perhaps) > Hi Remi, > > I have used Groovy exclusively for the last years, so not really used to > Java lambdas, but why can't you

Re: [GEP] Switch expressions syntax from Java 11 or 12 (perhaps)

2018-03-09 Thread Jochen Theodorou
On 09.03.2018 21:48, fo...@univ-mlv.fr wrote: [...] but in a switch, you can not delay the creation of a case (technically you can because you can always do weird thing but, it's not what people will expect), so disallowing int i = 0; switch(foo) { case 0 -> { i++; } } make little

Re: [GEP] Switch expressions syntax from Java 11 or 12 (perhaps)

2018-03-09 Thread Jochen Theodorou
On 08.03.2018 20:52, Remi Forax wrote: [...] using break here is ugly, i agree with you but we (the amber EG) are not able to find a better solution, if you know a better way to handle local return of a value in the case of a switch, please help us. should inspiration strike me I will let you

Re: Synthetic GroovyObject methods

2018-03-09 Thread Jochen Theodorou
On 09.03.2018 17:19, Daniel.Sun wrote: Hi Daniil, Maybe Jochen can tell us the reason. Ping Jochen ;-) Checking Verifier I see: if (!node.hasMethod("getProperty", GET_PROPERTY_PARAMS)) { MethodNode methodNode = addMethod(node, !isAbstract(node.getModifier

Re: Synthetic GroovyObject methods

2018-03-09 Thread Paul King
We have recently also started adding @Generated to such methods. Originally this was to assist with better results when doing coverage. One option would be to remove the synthetic now with the expectation that tools could look for the annotation. But I understand Jochen's point that this has been

Fwd: About supporting `var` of Java10+

2018-03-09 Thread Paul King
Hi, sorry I meant to respond to the list too. Messages included below. -- Forwarded message -- From: MG Date: Sat, Mar 10, 2018 at 7:19 AM Subject: Re: About supporting `var` of Java10+ To: pa...@asert.com.au Hi Paul, did you reply to just me on purpose ? On 09.03.2018 03:11,