[ https://issues.apache.org/jira/browse/GROOVY-5893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles resolved GROOVY-5893. --------------------------------- Fix Version/s: 5.0.0-alpha-3 Resolution: Fixed https://github.com/apache/groovy/commit/2e084efe49c0ef21a866232d6ab8a55182efba62 > 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 > Fix For: 5.0.0-alpha-3 > > > 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)