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

Christopher Smith updated GROOVY-10888:
---------------------------------------
    Affects Version/s: 4.0.12

> Parser doesn't accept wildcard in type witness
> ----------------------------------------------
>
>                 Key: GROOVY-10888
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10888
>             Project: Groovy
>          Issue Type: Bug
>          Components: parser-antlr4
>    Affects Versions: 4.0.7, 4.0.12
>            Reporter: Christopher Smith
>            Priority: Major
>
> In trying to work around issues relating to nested generic inference (in 
> stream collector definitions), I attempted to add a type witness to a 
> {{.collect}} invocation. As I don't care about the accumulator, and the 
> built-in {{Collectors}} tend to use {{A=?}}, I tried a wildcard, but I got a 
> parse error. This replicates the problem.
> {code}
> class Asdf {
>   void run() {
>     ['a', 'b'].stream()
>       .<Map<Boolean, List<String>>, ?> collect(partitioningBy { it == 'a' })
>   }
> }
> {code}



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

Reply via email to