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

Paul King updated GROOVY-7976:
------------------------------
    Summary: Sort methods that accept a comparator should accept Comparator<? 
super T>  (fix DGM signatures)  (was: Sort methods that accept a comparator 
should accept Comparator<? super T>)

> Sort methods that accept a comparator should accept Comparator<? super T>  
> (fix DGM signatures)
> -----------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-7976
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7976
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-jdk
>    Affects Versions: 2.4.7
>            Reporter: Mauro Molinari
>
> Methods like 
> {{org.codehaus.groovy.runtime.DefaultGroovyMethods.sort(Iterable<T>, boolean, 
> Comparator<T>)}} and all the others alike should be changed to accept a 
> {{Comparator<? super T>}}, otherwise if you use {{@CompileStatic}} you'll get 
> compiler errors as soon as you try to sort an Iterable/Collection using a 
> comparator that accept superclass instances.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to