Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.0-rc-1
-
None
Description
This code:
@groovy.transform.CompileStatic class Test { long[] data long topMask void doSomething() { long mask = 0 mask = mask | 0x1L data[ 0 ] = data[ 0 ] | mask } } new Test()
Gives the error:
[Static type checking] - Cannot assign value of type java.lang.Number to variable of type long
A workaround is to add a cast:
data[ 0 ] = data[ 0 ] | (long)mask
But I think that might cause GROOVY-5921 to rear its head again...
Investigating