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 2021/10/25 15:08:00 UTC

[jira] [Assigned] (GROOVY-8133) Static type checking failure for streams and spread operator

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

Eric Milles reassigned GROOVY-8133:
-----------------------------------

    Assignee: Eric Milles

> Static type checking failure for streams and spread operator
> ------------------------------------------------------------
>
>                 Key: GROOVY-8133
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8133
>             Project: Groovy
>          Issue Type: Improvement
>          Components: Static Type Checker
>    Affects Versions: 2.4.10
>         Environment: Windows 7, JDK 1.8.0_66
>            Reporter: Iurii
>            Assignee: Eric Milles
>            Priority: Major
>
> Input files:
> Test.groovy
> {code:groovy}
> class Test {
>     static void main(String[] args) {
>         [1, 2, 3].stream()*.toString()
>     }
> }
> {code}
> compiler-config.groovy
> {code:groovy}
> import groovy.transform.CompileStatic
> withConfig(configuration) {
>     ast(CompileStatic)
> }
> {code}
>     {{Error:(3, 9) Groovyc: [Static type checking] - Spread operator can only be used on collection types}}
> Expected: static type checking allows spread operator for streams



--
This message was sent by Atlassian Jira
(v8.3.4#803005)