Jochen Theodorou wrote
> there we access the field only directly if [...]  an explicit this is
> used. 

So should prefixing it with "this" should change the behaviour? 
It does not:

<pre>
​import groovy.transform.Field

@Field 
int x = 0  

a {
    assert this.x == 0    
    this.x = 1     
    assert this.x == 1    
} 

assert x == 0 

def a(Closure c) { 
    c() 
}  ​
</pre>



--
View this message in context: 
http://groovy.329449.n5.nabble.com/Closure-does-not-see-field-when-setting-value-tp5736534p5736543.html
Sent from the Groovy Users mailing list archive at Nabble.com.

Reply via email to