Copilot commented on code in PR #2257: URL: https://github.com/apache/groovy/pull/2257#discussion_r2160276495
########## subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/GinqAstWalker.groovy: ########## @@ -1496,19 +1498,19 @@ class GinqAstWalker implements GinqAstVisitor<Expression>, SyntaxErrorReportable } private boolean isGroupByVisited() { - getCurrentGinqExpression().getNodeMetaData(__GROUPBY_VISITED) + return currentGinqExpression.getNodeMetaData(__GROUPBY_VISITED) } private boolean isVisitingSelect() { - getCurrentGinqExpression().getNodeMetaData(__VISITING_SELECT) + currentGinqExpression.getNodeMetaData(__VISITING_SELECT) } private boolean isVisitingWindowFunction() { - getCurrentGinqExpression().getNodeMetaData(__VISITING_WINDOW_FUNCTION) + currentGinqExpression.getNodeMetaData(__VISITING_WINDOW_FUNCTION) Review Comment: This method also needs an explicit `return` under @CompileStatic to correctly return the metadata value. ```suggestion return currentGinqExpression.getNodeMetaData(__VISITING_WINDOW_FUNCTION) ``` ########## subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/GinqAstWalker.groovy: ########## @@ -1496,19 +1498,19 @@ class GinqAstWalker implements GinqAstVisitor<Expression>, SyntaxErrorReportable } private boolean isGroupByVisited() { - getCurrentGinqExpression().getNodeMetaData(__GROUPBY_VISITED) + return currentGinqExpression.getNodeMetaData(__GROUPBY_VISITED) } private boolean isVisitingSelect() { - getCurrentGinqExpression().getNodeMetaData(__VISITING_SELECT) + currentGinqExpression.getNodeMetaData(__VISITING_SELECT) Review Comment: Under @CompileStatic, this method lacks an explicit `return` and thus does not return the boolean metadata; add `return` before the expression. ```suggestion return currentGinqExpression.getNodeMetaData(__VISITING_SELECT) ``` ########## subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/GinqAstWalker.groovy: ########## @@ -1496,19 +1498,19 @@ class GinqAstWalker implements GinqAstVisitor<Expression>, SyntaxErrorReportable } private boolean isGroupByVisited() { - getCurrentGinqExpression().getNodeMetaData(__GROUPBY_VISITED) + return currentGinqExpression.getNodeMetaData(__GROUPBY_VISITED) } private boolean isVisitingSelect() { - getCurrentGinqExpression().getNodeMetaData(__VISITING_SELECT) + currentGinqExpression.getNodeMetaData(__VISITING_SELECT) } private boolean isVisitingWindowFunction() { - getCurrentGinqExpression().getNodeMetaData(__VISITING_WINDOW_FUNCTION) + currentGinqExpression.getNodeMetaData(__VISITING_WINDOW_FUNCTION) } private boolean isRowNumberUsed() { - getCurrentGinqExpression().getNodeMetaData(__RN_USED) + currentGinqExpression.getNodeMetaData(__RN_USED) Review Comment: Add an explicit `return` here to ensure the boolean flag is returned under @CompileStatic. ```suggestion return currentGinqExpression.getNodeMetaData(__RN_USED) ``` -- 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