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/02/09 20:19:00 UTC

[jira] [Updated] (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 updated GROOVY-8133:
--------------------------------
    Fix Version/s: 4.0.1

> 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
>             Fix For: 5.0.0-alpha-1, 4.0.1
>
>
> 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.20.1#820001)