Prior to Groovy 5, a special case exists within classgen that selects static outer class field for unresolved this property expressions. Consider the following:
class Pogo {
private static value = 1
void test() {
Map<String,Object> map = [value: 2]
map.with {
print value
print this.value
def that = this
print that.value
}
}
}
new Pogo().test()
This script prints "111" indicating that all "value" expressions come from the static field. However, the implicit-this occurrence is highlighted as a dynamic (map) property.

Prior to Groovy 5, a special case exists within classgen that selects static outer class field for unresolved
thisproperty expressions. Consider the following:This script prints "111" indicating that all "value" expressions come from the static field. However, the implicit-
thisoccurrence is highlighted as a dynamic (map) property.