Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.6, 2.3.9
-
None
Description
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:
public static <T, U extends T, V extends T> T inject(Collection self, U initialValue, Closure<V> closure)
So both U and V must be took into account to be able to infer the return type T.
Attachments
Issue Links
- is related to
-
GROOVY-5874 Groovyc: BUG! exception in phase 'class generation' in source unit
- Closed
- relates to
-
GROOVY-7934 Type inference breaks for Collection.inject
- Open