Skip to content

Fix type inferencing and syntax highlighting of general property access #1230

@eric-milles

Description

@eric-milles

Consider the following:

class A {
  def getAttribute(String name) {
    "attribute $name"
  }
  def getProperty(String name) {
    "property $name"
  }
  def propertyMissing(name) {
    "missing $name"
  }
  def get(String name) {
    "general $name"
  }
  void test() {
    this.@xyz
    this.xyz
  }
}
class C {
  int xyz
  void test() {
    new A().with {
      xyz
    }
  }
}

Since A implements general attribute/property access mechanisms, the references "xyz" should indicate a declaring class of A.

image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions