groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GROOVY-8549) Compile Static causes getAt to fail
Date Tue, 17 Apr 2018 08:22:00 GMT

     [ https://issues.apache.org/jira/browse/GROOVY-8549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paul King updated GROOVY-8549:
------------------------------
    Description: 
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}

  was:
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:

 
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]


> Compile Static causes getAt to fail
> -----------------------------------
>
>                 Key: GROOVY-8549
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8549
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.4.13, 2.5.0-beta-3, 2.4.14, 3.0.0-alpha-2, 2.4.15
>         Environment: Intellij plus various versions of Groovy; the same problem also
occurs in Eclipse-Groovy with the same versions
>            Reporter: Jon Kerridge
>            Priority: Major
>             Fix For: 2.4.12
>
>
> 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
(v7.6.3#76005)

Mime
View raw message