Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.5.6
-
Fix Version/s: 3.0
-
Component/s: class generator
-
Labels:None
-
Environment:Windows XP SP 2
Eclipse 3.3 & groovy-all-1.5.6.jar
-
Number of attachments :
Description
Even the inheritance is correct - the following sample returns a:
Exception in thread "main" groovy.lang.MissingMethodException: No signature of method: test.Child.parentMethodB() is applicable for argument types: () values: {}
Parent.java
package test public class Parent{ private String parentMethodB(){ return "parentMethodB"; } protected String parentMethodC(){ def closure={ return parentMethodB()} return closure() } }
Child.java
package test public class Child extends Parent{ public static void main(def args){ Child c = new Child(); println(c.parentMethodC()) } }
Issue Links
| This issue is duplicated by: | ||||
| GROOVY-2565 | Exception with inheritance and private method calls from a closure |
|
|
|
| This issue depends upon: | ||||
| GROOVY-2503 | MOP 2.0 design inflluencing issues |
|
|
|
| GROOVY-3010 | fix private field visibility |
|
|
|
Hi,
This issue can be "solved" (not really a solution) by turning the visility of method "private String parentMethodB(){...}" to protected: "protected String parentMethodB(){...}".
Regards
Raoul