eric-milles commented on code in PR #2415:
URL: https://github.com/apache/groovy/pull/2415#discussion_r3016831614


##########
src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java:
##########
@@ -965,6 +965,8 @@ public static List<MethodNode> chooseBestMethod(final 
ClassNode receiver, Collec
             var view = methods;
             if (duckType) {
                 view = methods.stream().filter(m -> 
implementsInterfaceOrSubclassOf(rcvr, m.getDeclaringClass())).toList();
+                if (view.size() > 1)
+                    view = removeCovariantsAndInterfaceEquivalents(view, true);

Review Comment:
   Can you add a GROOVY-11888 comment to this line?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to