Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5.16, 3.0.10, 4.0.0
-
None
Description
Consider the following:
@groovy.transform.NamedVariant def m(int one, int two = 42) { "$one $two" } String result = m(one:0, two:0) assert result == '0 0' // fails
Attachments
Issue Links
- is cloned by
-
GROOVY-10502 NamedVariant: improve consistency of default value treatment
- Closed
- relates to
-
GROOVY-10498 NamedVariant: default value overrides supplied value if it's falsy (positional parameter)
- Open