title: Groovy closure not work with static final field from super class
body: <pre><code>class Parent {
      final static String newLine = "*"
  }
  class Child extends Parent{
      List body = [3, 4, 5]
      String toString() {
          def str = new StringBuilder()
          body.each { str.append(it + newLine) }
          str
      }
  }
  
  def c = new Child()
  println c
  </code></pre>
  
  <p>The above is one trivial sample to illustrate the problem. It couldn't be compiled using <code>Groovy plugin</code> on <code>Eclipse</code>. Remove either <code>final</code> or <code>static</code> in the field of super class solves the problem. However, I have no idea why it's the case.</p>
  
  <p><a href="http://groovy.codehaus.org/Groovy+Beans" rel="nofollow">http://groovy.codehaus.org/Groovy+Beans</a>
  In this link it mentions the rules for property and fields used in Groovy. I suppose the one applied should be the last one, i.e. meta class. Unfortunately, I still couldn't understand the behavior.</p>
  
  <p>The behavior is reproduced consistently in all versions of Groovy. Maybe someone could report one bug to Groovy team. I have never done this before. It would be more efficient if someone experienced could do that.</p>