[ 
https://issues.apache.org/jira/browse/GROOVY-11275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17804925#comment-17804925
 ] 

Eric Milles edited comment on GROOVY-11275 at 1/11/24 11:13 PM:
----------------------------------------------------------------

There is an existing ticket for this: GROOVY-9239


was (Author: emilles):
There is an existing ticket for this. Don’t have the number at hand. 

> Support type witness in method reference
> ----------------------------------------
>
>                 Key: GROOVY-11275
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11275
>             Project: Groovy
>          Issue Type: Improvement
>          Components: Compiler, parser-antlr4
>    Affects Versions: 4.0.17
>            Reporter: Christopher Smith
>            Priority: Major
>
> Java permits type witnesses as part of a method reference to provide the 
> usual hinting:
> {code:java}
> Optional<List<Number>> foo = Optional.of(42).map(List::<Number>of);
> {code}
> The Groovy grammar as of 4.0.17 does not support type witnesses in this 
> position, but there are a number of cases where the compiler (particularly 
> the STC) has limitations with type inference and it would be helpful to have.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to