Skip to content

Fix type inferencing and syntax highlighting for inaccessible fields and properties #1567

@eric-milles

Description

@eric-milles

Consider the following:

abstract class A {
  private f
  private getP(){}
}

void test(A a) {
  a.@f     // MissingFieldException
  a.f      // MissingPropertyException
  a.p      // MissingPropertyException
  a.getP() // MissingMethodException
  a.with {
    it.@f  // MissingFieldException
    it.f   // MissingPropertyException
    it.p   // MissingPropertyException
    f      // MissingPropertyException
    p      // MissingPropertyException
    getP() // MissingMethodException
  }
}

Since A is abstract, a will always refer to a subclass instance. Therefore private member access will fail. No indication of this is given in the editor.

image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions