groovy-eclipse icon indicating copy to clipboard operation
groovy-eclipse copied to clipboard

Fix type inferencing and syntax highlighting for `class` and `metaClass` properties of map-based type

Open eric-milles opened this issue 1 year ago • 1 comments

Consider the following:

class M implements Map {
  @Delegate Map m= [:]
}

@CompileStatic test(M map) {
  map.class
  map.metaClass
}

"class" refers to getClass() method and "metaClass" refers to metaClass field (added by compiler) or getMetaClass() method. Highlighting indicates these are map entries (for Groovy < 5).

image

eric-milles avatar May 05 '24 15:05 eric-milles

https://issues.apache.org/jira/browse/GROOVY-11368

eric-milles avatar May 06 '24 00:05 eric-milles