You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (JIRA)" <ji...@apache.org> on 2018/05/08 15:13:00 UTC

[jira] [Created] (GROOVY-8573) Add @ClosureParams to each/eachWithIndex methods in DefaultGroovyMethods

Eric Milles created GROOVY-8573:
-----------------------------------

             Summary: Add @ClosureParams to each/eachWithIndex methods in DefaultGroovyMethods
                 Key: GROOVY-8573
                 URL: https://issues.apache.org/jira/browse/GROOVY-8573
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 2.5.0-rc-2, 2.4.15, 3.0.0-alpha-2, 2.6.0-alpha-3
            Reporter: Eric Milles


Category methods {{each(T,Closure)}} and {{eachWithIndex(T,Closure)}} are missing {{@ClosureParams}} annotations.

From some cursory testing, it looks like these are the necessary additions:
{code:java}
public static <T> T each(T self, @ClosureParams(value=FromString.class, options={"T"}) Closure closure)

public static <T> T eachWithIndex(T self, @ClosureParams(value=FromString.class, options="T,Integer") Closure closure)
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)