[ 
https://issues.apache.org/jira/browse/GROOVY-8133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15946557#comment-15946557
 ] 

Jochen Theodorou commented on GROOVY-8133:
------------------------------------------

The compiler could know about it before that using a dummy ClassNode. We did 
something like that for Annotation for example when we still did not require 
jdk5. And I guess we should use map for the implementation here

> 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
>
> Input files:
> Test.groovy
> class Test {
>     static void main(String[] args) {
>         [1, 2, 3].stream()*.toString()
>     }
> }
> compiler-config.groovy
> import groovy.transform.CompileStatic
> withConfig(configuration) {
>     ast(CompileStatic)
> }
> 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
(v6.3.15#6346)

Reply via email to