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 2022/07/23 16:29:00 UTC

[jira] [Updated] (GROOVY-10599) STC: support spread operator for list literals

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

Eric Milles updated GROOVY-10599:
---------------------------------
    Fix Version/s:     (was: 5.0.0-alpha-1)

> STC: 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: 4.0.3
>
>
> 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.10#820010)