Re: Default value in Closure
Spencer Allain <spencer_allain-/[email protected]>
| Newsgroups | gmane.comp.lang.groovy.user |
|---|---|
| Message-ID | <[email protected]> |
It should be the same as methods, https://docs.groovy-lang.org/latest/html/documentation/#_default_arguments, which allows any number of parameters with defaults.
If you are referring to https://docs.groovy-lang.org/latest/html/documentation/#_parameters, then maybe that documentation would be more clear with an example containing more than one default value?
-Spencer
On Tuesday, March 29, 2022, 11:36:18 PM EDT, Niranjan Ghule <[email protected]> wrote:
Hi Team,
In Closure with default values in parameters, only the last parameter can have a default value, isn't it?
We can add this detail in documentation.