Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.15, 3.0.0-alpha-3, 2.5.3
-
None
Description
The following code fails at runtime:
trait Validateable { boolean validate() { return foo() } private static boolean foo() { return false } } class DomainObject implements Validateable { String name } class Child extends DomainObject { } def child = new Child(name: 'name') child.validate()
With this error:
groovy.lang.MissingMethodException: No signature of method: Child.foo() is applicable for argument types: () values: []
Keep in mind that the Trait method is framework-code (in this case from Grails) and DomainObject and Child classes are user-code.
Attachments
Issue Links
- is related to
-
GROOVY-7191 CompileStatic Will Not Allow Instance Method In Trait To Call Static Method
- Closed
-
GROOVY-7322 Problem With Static Trait Methods
- Closed
-
GROOVY-8272 Extending trait can't execute static method
- Closed
-
GROOVY-8587 Calling super in an overridden method results in MissingMethodException when method indirectly inherited from trait
- Closed
-
GROOVY-11267 Trait static methods are not resolved when called from closure
- Closed
-
GROOVY-10312 MissingMethodException in method with default parameter in trait - regression in 3.0.9
- Closed