Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
2.0.5
-
None
-
None
-
Windows 7 64bit
Description
Assume we have the script:
import groovy.transform.CompileStatic import groovy.transform.TypeChecked @CompileStatic //@TypeChecked int incInt(int n) { def result = n ++result result++ return result } assert incInt(5) == 7,"Must be 7 but we have 5"
Increment operations not execute when @CompileStatic and a local variable is not explicitly typed.