You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/01/11 04:47:00 UTC
[jira] [Commented] (GROOVY-10898) Provide tail/init/head/first/last for primitive arrays
[ https://issues.apache.org/jira/browse/GROOVY-10898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17657077#comment-17657077 ]
ASF GitHub Bot commented on GROOVY-10898:
-----------------------------------------
paulk-asert merged PR #1842:
URL: https://github.com/apache/groovy/pull/1842
> Provide tail/init/head/first/last for primitive arrays
> ------------------------------------------------------
>
> Key: GROOVY-10898
> URL: https://issues.apache.org/jira/browse/GROOVY-10898
> Project: Groovy
> Issue Type: Improvement
> Components: groovy-jdk
> Reporter: Paul King
> Assignee: Paul King
> Priority: Minor
> Fix For: 5.0.0-alpha-1
>
>
> 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)