Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0.10, 4.0.0
-
None
-
None
Description
Consider the following:
import groovy.transform.* @ToString(includeNames=true) class Color { int r, g, b } @NamedVariant String m(@NamedDelegate Color color, Number alpha=4.5) { return [color, alpha].join(' ') } print m(r:1, g:2, b:3, 0.0) // "Color(r:1, g:2, b:3) 4.5"!
Attachments
Issue Links
- is related to
-
GROOVY-10497 NamedVariant: default value overrides supplied value if it's falsy
- Closed