Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6742

Groovy is unable to resolve this Generics use case

    XMLWordPrintableJSON

Details

    Description

      Groovy fails with the following error when compiling the hereafter function:
      Groovy:unable to resolve class F

          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))
                  }
              };
          }
      

      See attachment for a test case org.issues.Issue3

      May be linked to GROOVY-6167

      Attachments

        1. Generic.zip
          5 kB
          Nicolas Labrot

        Activity

          People

            daniel_sun Daniel Sun
            nithril Nicolas Labrot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: