[ 
https://issues.apache.org/jira/browse/GROOVY-10497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Milles updated GROOVY-10497:
---------------------------------
    Fix Version/s:     (was: 5.0.0-alpha-1)

> 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: 2.5.16, 3.0.10, 4.0.0
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>              Labels: named-parameters
>             Fix For: 2.5.16, 3.0.10, 4.0.1
>
>          Time Spent: 1.5h
>  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.10#820010)

Reply via email to