You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2021/03/15 19:50:08 UTC

[GitHub] [groovy] eric-milles commented on a change in pull request #1517: GROOVY-9977: share logic for functional interface assignment

eric-milles commented on a change in pull request #1517:
URL: https://github.com/apache/groovy/pull/1517#discussion_r594637443



##########
File path: src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
##########
@@ -1834,19 +1838,22 @@ public void visitField(final FieldNode node) {
         try {
             typeCheckingContext.isInStaticContext = node.isInStaticContext();
             currentField = node;
-            super.visitField(node);
+            visitAnnotations(node);

Review comment:
       If changed back, there are test cases that will fail.  It is technically possible to structure this so that the functional interface stuff comes before "super.visitField(node)" and the assignment type checking comes after (where it currently sits).
   
   The property visit could have its initialization expression visit dropped, since it is redundant with the field.  I thought that would be a riskier change to make.




----------------------------------------------------------------
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.

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