[
https://issues.apache.org/jira/browse/GROOVY-10477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-10477:
---------------------------------
Summary: SC: optimize for-in loop on array with dynamic variable (was: SC:
optimize for-each loop with dynamic variable)
> SC: optimize for-in loop on array with dynamic variable
> -------------------------------------------------------
>
> Key: GROOVY-10477
> URL: https://issues.apache.org/jira/browse/GROOVY-10477
> Project: Groovy
> Issue Type: Improvement
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
>
> Consider the following:
> {code:groovy}
> @groovy.transform.CompileStatic
> void test(String[] strings) {
> for (string in strings) {
> // ...
> }
> }
> {code}
> This code does not write an optimized array-based iteration since the type of
> "string" isn't explicitly declared. "for (String string in strings)" and "for
> (String string : strings)" are so optimized.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)