[ https://issues.apache.org/jira/browse/GROOVY-6637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-6637. ----------------------------- > CompileStatic when accessing parent class static properties produces access > forbidden message with incorrect line number info > ----------------------------------------------------------------------------------------------------------------------------- > > Key: GROOVY-6637 > URL: https://issues.apache.org/jira/browse/GROOVY-6637 > Project: Groovy > Issue Type: Bug > Components: Static compilation > Affects Versions: 2.2.2, 2.3.0, 2.3.1, 2.4.0-rc-1 > Reporter: Graeme Rocher > Assignee: Paul King > Fix For: 2.4.3 > > > The following: > {code} > import groovy.transform.* > @CompileStatic > class Foo { > static bar = "hello" > } > @CompileStatic > class Bar extends Foo{ > static something() { > println bar > } > } > new Bar().something() > {code} > Produces: > {code} > Access to java.lang.Object#bar is forbidden at line: -1, column: -1 > {code} > Changing the println to: > {code} > println getBar() > {code} > 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 -- This message was sent by Atlassian JIRA (v6.3.15#6346)