Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.1
-
None
Description
Simple source code to reproduce the problem
SampleClass.groovy
import groovy.transform.CompileStatic import groovy.transform.TypeChecked @TypeChecked @CompileStatic class SampleClass { def a = "some string" def b = a.toString() }
$ groovyc SampleClass.groovy
Produces java.lang.ArrayIndexOutOfBoundsException (attached full trace).
It's enough to reorder the annotations and all works fine:
SampleClass.groovy
import groovy.transform.CompileStatic import groovy.transform.TypeChecked @CompileStatic @TypeChecked class SampleClass { def a = "some string" def b = a.toString() }