Christopher Smith created GROOVY-11186:
------------------------------------------

             Summary: 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


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 [b...@corp.test]
{code}



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

Reply via email to