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 2018/05/11 09:57:00 UTC

[jira] [Resolved] (GROOVY-6742) Groovy is unable to resolve this Generics use case

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

Daniel Sun resolved GROOVY-6742.
--------------------------------
       Resolution: Fixed
         Assignee: Daniel Sun
    Fix Version/s: 2.5.0-rc-3
                   3.0.0-alpha-3
                   2.6.0-alpha-4

Fixed by https://github.com/apache/groovy/commit/05aac51a0fd3356787b73a0a255270f286d1a96a

> Groovy is unable to resolve this Generics use case
> --------------------------------------------------
>
>                 Key: GROOVY-6742
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6742
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>    Affects Versions: 2.2.2
>         Environment: Groovy 2.2
> Maven 3 with eclipse compiler
>            Reporter: Nicolas Labrot
>            Assignee: Daniel Sun
>            Priority: Major
>             Fix For: 2.6.0-alpha-4, 3.0.0-alpha-3, 2.5.0-rc-3
>
>         Attachments: Generic.zip
>
>
> Groovy fails with the following error when compiling the hereafter function:
> {{Groovy:unable to resolve class F}}
> {code}
>     public static <F, T> FutureCallback<F> deferredCallback(DeferredResult<T> deferredResult, final Function<F, T> function) {
>         return new FutureCallback<F>() {
>             @Override
>             void onSuccess(F result) {
>                 deferredResult.setResult(function.apply(result))
>             }
>         };
>     }
> {code}
> See attachment for a test case {{org.issues.Issue3}}
> May be linked to GROOVY-6167 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)