[
https://issues.apache.org/jira/browse/GROOVY-10497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17493378#comment-17493378
]
Eric Milles commented on GROOVY-10497:
--------------------------------------
https://github.com/apache/groovy/pull/1687
> NamedVariant: default value overrides supplied value if it's falsy
> ------------------------------------------------------------------
>
> Key: GROOVY-10497
> URL: https://issues.apache.org/jira/browse/GROOVY-10497
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 4.0.0
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Labels: named-parameters
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Consider the following:
> {code:groovy}
> @groovy.transform.NamedVariant
> def m(int one, int two = 42) {
> "$one $two"
> }
> String result = m(one:0, two:0)
> assert result == '0 0' // fails
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)