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 2022/02/19 16:34:00 UTC
[jira] [Updated] (GROOVY-8840) CLONE - Compile Static causes getAt to fail (advanced cases)
[ https://issues.apache.org/jira/browse/GROOVY-8840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-8840:
--------------------------------
Fix Version/s: 2.5.16
> CLONE - Compile Static causes getAt to fail (advanced cases)
> ------------------------------------------------------------
>
> Key: GROOVY-8840
> URL: https://issues.apache.org/jira/browse/GROOVY-8840
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 2.4.13, 2.5.0, 3.0.0
> Environment: Intellij plus various versions of Groovy; the same problem also occurs in Eclipse-Groovy with the same versions
> Reporter: Jon Kerridge
> Assignee: Eric Milles
> Priority: Major
> Fix For: 4.0.0-alpha-1, 3.0.5, 2.5.16
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> I can reproduce by adding @CompileStatic to the example I tried previously and can confirm that 2.4.13 is where the regression started. Workaround would be to remove @CompileStatic until we can get a fix in place. If you can raise a bug issue in Jira, that would be great.
> the reproducer following is a shortened version created by Paul King:
> {code}
> import groovy.transform.CompileStatic
>
> @CompileStatic
> def method() {
> def list = [0, 1, 2, 3]
> for (idx in 1..2) {
> list[idx-1]++
> }
> list
> }
>
> assert method() == [1, 2, 2, 3]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)