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/04/26 19:40:00 UTC

[jira] [Created] (GROOVY-10599) SC: support spread operator for list literals

Eric Milles created GROOVY-10599:
------------------------------------

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


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)