title: Why Groovy Enums has no access to class variables?
body: <p>Could not find any documentation that explains why class variables are not accessible from within enums. Consider this example:</p>
  
  <pre><code>package groovy;
  
  public class Universe {
  
      static String test = "test";
  
      enum Planet {
  
          EARTH {
              @Override
              void doSomething(){
                  System.out.print(test);
              }
          };
  
          abstract void doSomething();
      }
  
      public static void main(String[] args) {
          Universe.Planet.EARTH.doSomething(); // No such property: test for class: groovy.Universe$Planet$1
      }
  }
  </code></pre>
  
  <p>I am aware that this code is also perfect Java code. Though it works as expected using JRE but not with Groovy's runtime environment which makes me even more curious. Is there any proof for the difference? Thanks</p>