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

Java compatibility: consider supporting method reference with generics

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • parser-antlr4
    • None

    Description

      A bit of a rare use case, but ran into it and noticed MethodReferenceExpression has no support for this sort thing. Java supports generics for method references.

      For example:

      def <T extends CharSequence> T chars() { ... }
      Supplier s = this::<String>chars
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              emilles Eric Milles
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: