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


##########
src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java:
##########
@@ -2685,7 +2685,8 @@ && isStringType(getType(nameExpr))) {
                         .peek(candidate -> 
checkOrMarkPrivateAccess(expression, candidate)) // GROOVY-11365
                         .map (candidate -> {
                             ClassNode returnType = candidate.getReturnType();
-                            if (!candidate.isStatic() && 
GenericsUtils.hasUnresolvedGenerics(returnType)) {
+                            if (!isStaticInContext(candidate) // GROOVY-11683

Review Comment:
   [nitpick] The inline comment splits the conditional and can reduce 
readability; consider moving `// GROOVY-11683` to its own line above the `if` 
statement or into a Javadoc comment for clarity.
   ```suggestion
                               // GROOVY-11683
                               if (!isStaticInContext(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