[
https://issues.apache.org/jira/browse/GROOVY-10682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17609558#comment-17609558
]
Eric Milles edited comment on GROOVY-10682 at 9/26/22 3:54 PM:
---------------------------------------------------------------
For each deprecated method, you can replace the whole javadoc comment with
{{@Deprecated}}. Since they exist now only for binary compatibility, they
don't require the docs which now exist in {{ArrayGroovyMethods}}.
You'll also need to register {{ArrayGroovyMethods}} in
{{DefaultGroovyMethods}}'s {{DGM_LIKE_CLASSES}}. This commit is a good
reference:
https://github.com/apache/groovy/commit/37af188c3f944f730b6140f44b1e72131a13137a
was (Author: emilles):
For each deprecated method, you can replace the whole javadoc comment with
{{@Deprecated}}. Since they exist now only for binary compatibility, they
don't require the docs which now exist in {{ArrayGroovyMethods}}.
You'll also need to search for {{DefaultGroovyMethods}}. There are a couple
places it is registered as an extension. This commit is a good reference:
https://github.com/apache/groovy/commit/37af188c3f944f730b6140f44b1e72131a13137a
> 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)