Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.4.3
-
None
-
None
Description
abstract class A { private void m() { println 'm' } void wrong() { m() Closure c = { m() } c() } } class B { A a = new A() {} void b() { a.wrong() } } def b = new B() b.b()
Produces the following error:
groovy.lang.MissingMethodException: No signature of method: B.m() is applicable for argument types: () values: [] Possible solutions: b(), is(java.lang.Object), dump(), any(), any(groovy.lang.Closure), use([Ljava.lang.Object;) at B.this$dist$invoke$1(wrong.groovy) at B$1.methodMissing(wrong.groovy) at A.invokeMethod(wrong.groovy) at A$_wrong_closure1.doCall(wrong.groovy:9) at A$_wrong_closure1.doCall(wrong.groovy) at A.wrong(wrong.groovy:12) at A$wrong.call(Unknown Source) at B.b(wrong.groovy:20) at B$b.call(Unknown Source) at wrong.run(wrong.groovy:25)
Attachments
Issue Links
- is related to
-
GROOVY-2433 Closure in base class unable to call private methods when invoked from derived class
- Closed