[
https://issues.apache.org/jira/browse/GROOVY-9033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles resolved GROOVY-9033.
---------------------------------
Fix Version/s: 4.0.0-beta-1
Resolution: Fixed
> Bad code green: empty list literal with each method
> ---------------------------------------------------
>
> Key: GROOVY-9033
> URL: https://issues.apache.org/jira/browse/GROOVY-9033
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 2.5.6
> Reporter: Daniil Ovchinnikov
> Assignee: Eric Milles
> Priority: Major
> Fix For: 4.0.0-beta-1
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> {code:groovy}
> @groovy.transform.CompileStatic
> List<String> usage() {
> def l = [].each {}
> return l // expected error: Incompatible generic argument types. Cannot
> assign java.util.List <java.lang.Object> to: java.util.List <String>
> }{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)