[ https://issues.apache.org/jira/browse/GROOVY-8053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Sun updated GROOVY-8053: ------------------------------- Fix Version/s: (was: 2.5.x) (was: 3.x) 2.5.8 3.0.0-rc-1 > Groovyc: anonymous class in static method cannot access its fields without > "this" > --------------------------------------------------------------------------------- > > Key: GROOVY-8053 > URL: https://issues.apache.org/jira/browse/GROOVY-8053 > Project: Groovy > Issue Type: Bug > Affects Versions: 2.4.8 > Environment: JAVA_VERSION="1.8.0_111" > OS_NAME="Windows" > OS_VERSION="5.2" > OS_ARCH="amd64" > Reporter: Daniel Huss > Priority: Minor > Fix For: 2.5.8, 3.0.0-rc-1 > > > {code} > import groovy.transform.CompileStatic > @CompileStatic // also happens without it > final class TestCase { > static thisShouldCompile() { > Object o = new Object() { > int inaccessible > @Override > int hashCode() { > inaccessible++ // succeeds when qualified with "this" > return super.hashCode() > } > } > } > static void main( String... args ) { > thisShouldCompile() > System.out.println( "Success" ) > } > } > {code} > Could be related to GROOVY-7020 -- This message was sent by Atlassian Jira (v8.3.4#803005)