[
https://issues.apache.org/jira/browse/GROOVY-10599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles resolved GROOVY-10599.
----------------------------------
Fix Version/s: 5.0.0-alpha-1
Resolution: Fixed
https://github.com/apache/groovy/commit/5c468cd352f37fb5c599a3f51534ffcc55b339ed
> SC: support spread operator for list literals
> ---------------------------------------------
>
> Key: GROOVY-10599
> URL: https://issues.apache.org/jira/browse/GROOVY-10599
> Project: Groovy
> Issue Type: Improvement
> Components: Static compilation, Static Type Checker
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 5.0.0-alpha-1
>
>
> Consider the following:
> {code:groovy}
> void test(List<String> list) { }
> List<String> strings = ['y','z']
> test(['x', *strings])
> {code}
> STC infers wring type for "*strings" which prevents the use of spread for
> list literals.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)