[
https://issues.apache.org/jira/browse/GROOVY-5609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles resolved GROOVY-5609.
---------------------------------
Resolution: Fixed
Appears to be working properly in Groovy 2.5:
!image-2021-06-09-10-10-45-810.png!
> Type checking of generic argument types of extension methods on abstract
> classes using generics
> -----------------------------------------------------------------------------------------------
>
> Key: GROOVY-5609
> URL: https://issues.apache.org/jira/browse/GROOVY-5609
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 2.0.1
> Reporter: Cédric Champeau
> Priority: Minor
>
> If an extension method is using an abstract class or an array as the first
> argument and that argument makes use of a generic type defined in the
> signature of the extension method, the type checker won't be able to type
> check a method call properly.
> Example:
> {code}
> // <T> is used in the first argument
> public static <T> void foo(AbstractList<T> list, T[] elems)
> // <T> is used in an array of the first argument
> public static <T> void foo(T[] list, T[] elems)
> {code}
> Note that the limitation doesn't exist if the method is defined on an
> interface.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)