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

Paul King commented on GROOVY-9751:
-----------------------------------

Merged, thanks!

> STC: error for addAll with collect argument
> -------------------------------------------
>
>                 Key: GROOVY-9751
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9751
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.5
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 4.0.0-alpha-1, 3.0.6
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Follow up from GROOVY-9734 and GROOVY-8961.  New STC error for generics 
> mismatch when pairing {{collect}} with a method pointer:
> {code:groovy}
> interface Service {
>   Number transform(String s)
> }
> @groovy.transform.TypeChecked
> void test(Service service) {
>   Set<Number> numbers = []
>   List<String> strings = ['x','y','z']
>   numbers.addAll(strings.collect(service.&transform)) // Cannot call 
> java.util.Set <Number>#addAll(java.util.Collection <? extends 
> java.lang.Number>) with arguments [java.util.List <? extends E>]
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to