Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Groovy implicit spread-dot operator

Tags:

syntax

groovy

So, in Groovy, list.elementProp yields the same result as list*.elementProp.

Junior members on the team seem to keep using this feature unintentionally.

I can't find any reference to this behavior in the Groovy docs. Can anyone point me to such documentation?

Edit: The flagged duplicate question pertains to how it works, not where it is documented.

like image 702
Adam Augusta Avatar asked Sep 11 '26 00:09

Adam Augusta


1 Answers

It's here

http://docs.groovy-lang.org/latest/html/documentation/#gpath_expressions

In the GPath expressions section

like image 151
tim_yates Avatar answered Sep 14 '26 20:09

tim_yates



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!