Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Closures defined in base classes are not able to access private methods in the same base class, when invoked from a derived class. Java visibility rules imply that this should not happen. When the private methods are made public, the error disappears. Also, when the closure is converted to a method the problem also disappears. Compiling and running the TestCase class included (along with Base class) should reproduce the problem. It's easier to see the problem than to try and describe it.
Attachments
Attachments
Issue Links
- depends upon
-
GROOVY-2503 MOP 2.0 design inflluencing issues
- Open
- is duplicated by
-
GROOVY-10723 Closure in parent class can't access private method in same class when called from a child class
- Closed
- is related to
-
GROOVY-5438 Private field inaccessible in closure when using a subclass
- Closed
- relates to
-
GROOVY-3073 Private inheritance bug: Closure accessing private method
- Closed
-
GROOVY-5051 'this' uses in a superclass is treated as subclass, preventing acces to private members
- Closed
-
GROOVY-6335 MissingPropertyException when private static property is used inside a nested closure and called from a child class
- Closed
-
GROOVY-7375 Incorrect closure owner inside anonymous inner class
- Closed
-
GROOVY-8905 MissingMethodException when private method is called on parent class in a closure
- Closed
-
GROOVY-9987 MissingMethodException when a base class calls a private static method inside a closure
- Closed
-
GROOVY-10568 MissingMethodException using method-pointer operator in superclass
- Closed