Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.2, 2.3.0, 2.3.1, 2.4.0-rc-1
-
None
Description
The following:
import groovy.transform.* @CompileStatic class Foo { static bar = "hello" } @CompileStatic class Bar extends Foo{ static something() { println bar } } new Bar().something()
Produces:
Access to java.lang.Object#bar is forbidden at line: -1, column: -1
Changing the println to:
println getBar()
fixes the problem, but shouldn't be necessary.
In addition, even if using only 'bar' was to be forbidden, the line number information is incorrect