Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.6
-
None
Description
When using a method reference such as HasId::getId, the compiler implements the request by generating a MethodClosure. However, the closure accepts only the exact type of the reference, not subtypes. All compile-time checks pass, but the closure throws MissingMethodException at runtime with the message
No signature of method: org.codehaus.groovy.runtime.MethodClosure.getId() is applicable for argument types: (com.example.ClassWithId)