Consider the following:
class A {
private static X = 1
static getX() { 2 }
static class B {
void test() {
println X
}
}
}
new A.B().test()
When executed, this prints 2. However, the variable expression "X" is indicating a reference to the class variable not the accessor method.

Consider the following:
When executed, this prints 2. However, the variable expression "X" is indicating a reference to the class variable not the accessor method.