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

Eric Milles edited comment on GROOVY-10682 at 9/26/22 3:55 PM:
---------------------------------------------------------------

No, please leave {{each}} and {{eachWithIndex}} variants that use non-array 
types in {{DefaultGroovyMethods}}.

And can you squash all your commits into a single one?  You can do this by 
resetting to head on your branch then you'll have all your changes and you can 
push your branch with force on and you''' get just one commit.  This can be 
repeated each time you wish to amend your commit while still being reviewed.


was (Author: emilles):
No, please leave {{each}} and {{eachWithIndex}} variants that use non-array 
types in {{DefaultGroovyMethods}}.  And can you squash all your commits into a 
single one?  You can do this by resetting to head on your branch then you'll 
have all your changes and you can push your branch with force on and you''' get 
just one commit.  This can be repeated each time you wish to amend your commit 
while still being reviewed.

> Provide eachWithIndex for primitive arrays
> ------------------------------------------
>
>                 Key: GROOVY-10682
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10682
>             Project: Groovy
>          Issue Type: Improvement
>          Components: groovy-jdk
>            Reporter: Eric Milles
>            Assignee: Eric Milles
>            Priority: Minor
>
> Consider the following:
> {code:groovy}
> @groovy.transform.TypeChecked
> void test(int[] ints) {
>   ints.eachWithIndex { value, index ->
>     println "$index: ${value.doubleValue()}"
>   }
> }
> test(0,1,2,3,4,5)
> {code}
> Compiler reports "[Static type checking] - Cannot find matching method 
> java.lang.Object#doubleValue()"
> {{eachWithIndex}} is only provided for reference types, so "value" is seen as 
> Object by the type checker.



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

Reply via email to