Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
2.0.1
-
None
Description
in short: calling the ++ operator on an Integer does not increment the value when using static compilation.
Example:
class IntegerIncrementStaticCompilationBug { Integer index = 0 @groovy.transform.CompileStatic void increment() { index++ } } def b = new IntegerIncrementStaticCompilationBug() b.increment(); b.increment(); b.increment() println b.index
This script should print "3", but it prints "0".
Works find when CompileStatic annotation is removed.