You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (Jira)" <ji...@apache.org> on 2021/04/16 02:07:00 UTC
[jira] [Resolved] (GROOVY-10036) STC: unresolved generics for
return type of extension method call with full type arguments
[ https://issues.apache.org/jira/browse/GROOVY-10036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Sun resolved GROOVY-10036.
---------------------------------
Fix Version/s: 4.0.0-beta-1
Resolution: Fixed
The proposed PR has been merged. Thanks!
> STC: unresolved generics for return type of extension method call with full type arguments
> ------------------------------------------------------------------------------------------
>
> Key: GROOVY-10036
> URL: https://issues.apache.org/jira/browse/GROOVY-10036
> Project: Groovy
> Issue Type: Improvement
> Components: Static Type Checker
> Affects Versions: 2.5.14, 3.0.7, 4.0.0-alpha-3
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Minor
> Fix For: 4.0.0-beta-1
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Consider the following:
> {code:groovy}
> @groovy.transform.TypeChecked
> void test() {
> def list = ['x','y']
> def map = list.<String,Object,String>collectEntries { [it, it.length()] }
> }
> {code}
> The type checker infers {{Map<K,V>}} for the type of "map" even though all type arguments are provided to "collectEntries".
> {code:java}
> public static <K,V,E> Map<K, V> collectEntries(Iterable<E> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure<?> transform)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)