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

Eric Milles updated GROOVY-9033:
--------------------------------
    Fix Version/s: 2.5.17

> 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, 2.5.17, 3.0.11
>
>          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.20.10#820010)

Reply via email to