You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2024/03/10 01:53:00 UTC

[jira] [Updated] (GROOVY-11186) Support spread method arguments for iterable, iterator and stream

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

Eric Milles updated GROOVY-11186:
---------------------------------
    Summary: Support spread method arguments for iterable, iterator and stream  (was: permit spread operator on Set)

> Support spread method arguments for iterable, iterator and stream
> -----------------------------------------------------------------
>
>                 Key: GROOVY-11186
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11186
>             Project: Groovy
>          Issue Type: Improvement
>    Affects Versions: 4.0.13
>            Reporter: Christopher Smith
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 5.0.0-alpha-7
>
>
> In a Spock test case, I am trying to merge the e-mail addresses for two test users, where {{emails}} is of declared type {{java.util.Set}}:
> {code}
> methodCall([*BOB.emails, *BRAD.emails])
> {code}
> I expected the spread to inline the values, but instead I get
> {code}
> java.lang.IllegalArgumentException: cannot spread the type java.util.LinkedHashSet with value [bob@corp.test]
> {code}



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