Skip to content

Fix type inferencing and syntax highlighting for indirect private field reference #1559

@eric-milles

Description

@eric-milles

Consider the following:

class C {
  private foo
  def getFoo() { foo }
}
class D extends C {  }

def obj = new D()
obj.foo = null
print(obj.foo)

The property "foo" is read-only. "obj.foo = null" should not infer as the provate field from C. This is confirmed by running the script:

ReadOnlyPropertyException: Cannot set readonly property: foo for class: D

image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions