[ https://issues.apache.org/jira/browse/GROOVY-5893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles reassigned GROOVY-5893: ----------------------------------- Assignee: Eric Milles > Return type of "inject" is not inferred properly > ------------------------------------------------ > > Key: GROOVY-5893 > URL: https://issues.apache.org/jira/browse/GROOVY-5893 > Project: Groovy > Issue Type: Bug > Components: Static compilation > Affects Versions: 2.0.6, 2.3.9 > Reporter: Cédric Champeau > Assignee: Eric Milles > Priority: Major > > The return type of {{inject}} is not inferred properly. Currently, there's no > rule allowing the type checker to infer the type. The signature of the method > is: > {code} > public static <T, U extends T, V extends T> T inject(Collection self, U > initialValue, Closure<V> closure) > {code} > So both {{U}} and {{V}} must be took into account to be able to infer the > return type {{T}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)