Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Follow up from GROOVY-11319. One case that was left unhandled is the implicit-this case. Consider the following:
abstract class A { private int x // or "private int getX() {}" } class C extends A { @TypeChecked m() { super.x // "No such property: x" error this.x // "No such property: x" error x // MissingPropertyException at runtime this.with { thisObject.x // "No such property: x" error delegate.x // "No such property: x" error owner.x // "No such property: x" error this.x // "No such property: x" error it.x // "No such property: x" error x // MissingPropertyException at runtime } } }
Attachments
Issue Links
- is related to
-
GROOVY-9850 STC: add error for write of private or package-private field of super class
- Closed
-
GROOVY-11319 Access to a private property of a parent object is not caught
- Closed