[
https://issues.apache.org/jira/browse/GROOVY-11186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles resolved GROOVY-11186.
----------------------------------
Fix Version/s: 5.0.0-alpha-7
Resolution: Fixed
https://github.com/apache/groovy/commit/5fbc4fbdb54450845db49c1a014e924dafd68fc1
> permit spread operator on Set
> -----------------------------
>
> 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 [[email protected]]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)