Fix type inferencing and syntax highlighting for inaccessible fields and properties
eric-milles opened this issue · 2 comments
eric-milles commented
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.
eric-milles commented
Similar to #815 and #1559. See also: https://issues.apache.org/jira/browse/GROOVY-11358
eric-milles commented