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

Eric Milles reassigned GROOVY-10722:
------------------------------------

    Assignee: Eric Milles

> AIC via array-based (variadic) constructor null and array arguments
> -------------------------------------------------------------------
>
>                 Key: GROOVY-10722
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10722
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Minor
>              Labels: varargs
>
> Follow up from GROOVY-7370. Consider the following:
> {code:groovy}
> class C {
>   C(String... args) {
>     strings = args
>   }
>   public String[] strings
> }
> def x = new C(null) { }
> assert x.strings == null
> def y = new String[0]
> def z = new C( y ) { }
> assert z.strings.length == 0
> {code}
> 7370 handles no arguments for array and more than one.  Passing null is 
> supposed to set the array to null, not pass an array with one null element.  
> Passing an array through an untyped variable is also a problem.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to