I encounter the following problem today when using Groovy closure with class inheritance involved:
The base class “BaseClass” has a protected method “doA”, in which it has a method invocation which takes a closure as argument. In that closure, a private method “doB” of “BaseClass” is used. This class works fine;
Now a subclass of “BaseClass” is created as “SubClass”, it overrides “doA”. After some operations, it invokes “doA” in “BaseClass” as well. But at this moment, an “MissingMethodException” is thrown which complains “doB” cannot be found.