Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Consider the following:
package p interface A { String decode(String s) } class B implements A { String decode(String s) { s } } class C implements A { @Delegate private final B b = new B() }
package p class D extends C { // implements A @groovy.transform.TypeChecked void test() { def x = decode('string') } }
The class D implements A through its superclass C, which declares decode(String). However the type-checker says "Cannot find matching method D#decode(java.lang.String). Please check if the declared type is correct and if the method exists."
Attachments
Issue Links
- fixes
-
GROOVY-10767 Cannot find matching method when trait that implements another trait is compiled statically
- Closed
- is related to
-
GROOVY-9890 Static type checking can't find default method overload on interface
- Closed
-
GROOVY-5166 Static type checker should handle closure shared variables properly
- Closed