You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2019/08/29 20:46:00 UTC
[jira] [Updated] (GROOVY-9239) Add support for method reference
with generics
[ https://issues.apache.org/jira/browse/GROOVY-9239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-9239:
--------------------------------
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:
{code:groovy}
def <T extends CharSequence> T chars() { ... }
Supplier s = this::<String>chars
{code}
was:
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:
{code:groovy}
def <T extends CharSequence> chars() { ... }
Supplier s = this::<String>chars
{code}
> Add support for method reference with generics
> ----------------------------------------------
>
> Key: GROOVY-9239
> URL: https://issues.apache.org/jira/browse/GROOVY-9239
> Project: Groovy
> Issue Type: Improvement
> Components: parser-antlr4
> Reporter: Eric Milles
> Priority: Minor
>
> 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:
> {code:groovy}
> def <T extends CharSequence> T chars() { ... }
> Supplier s = this::<String>chars
> {code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)