Copilot commented on code in PR #2230:
URL: https://github.com/apache/groovy/pull/2230#discussion_r2106163477


##########
src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java:
##########
@@ -1537,6 +1537,14 @@ && 
isUsingGenericsOrIsArrayUsingGenerics(type.getComponentType())) {
                 }
                 return true; // incompatible
             }
+            if (!fixedPlaceHolders.contains(entry.getKey())
+                    && !resolved.isPlaceholder() && !resolved.isWildcard()
+                    && !candidate.isPlaceholder() && !candidate.isWildcard()) {

Review Comment:
   [nitpick] The boolean expression is quite long and complex; consider 
extracting it into a well-named predicate method to improve readability.
   ```suggestion
               if (shouldUpdateResolvedGenerics(fixedPlaceHolders, 
entry.getKey(), resolved, candidate)) {
   ```



-- 
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: notifications-unsubscr...@groovy.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to