groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [groovy] branch master updated: Add `CompileStatic` annotation to synthetic method nodes
Date Mon, 22 Jul 2019 03:01:37 GMT
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 99f5438  Add `CompileStatic` annotation to synthetic method nodes
99f5438 is described below

commit 99f54381f35f57c229e691e9d7d4fc7b49069bab
Author: Daniel.Sun <sunlan@apache.org>
AuthorDate: Mon Jul 22 07:15:46 2019 +0800

    Add `CompileStatic` annotation to synthetic method nodes
---
 .../classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java     | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java
b/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java
index 9d727f1..0343ea2 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java
@@ -210,6 +210,7 @@ public class StaticTypesMethodReferenceExpressionWriter extends MethodReferenceE
         );
 
         syntheticMethodNode.addAnnotation(new AnnotationNode(ClassHelper.make(Generated.class)));
+        syntheticMethodNode.addAnnotation(new AnnotationNode(ClassHelper.make(groovy.transform.CompileStatic.class)));
 
         return syntheticMethodNode;
     }
@@ -239,6 +240,7 @@ public class StaticTypesMethodReferenceExpressionWriter extends MethodReferenceE
         );
 
         syntheticMethodNode.addAnnotation(new AnnotationNode(ClassHelper.make(Generated.class)));
+        syntheticMethodNode.addAnnotation(new AnnotationNode(ClassHelper.make(groovy.transform.CompileStatic.class)));
 
         return syntheticMethodNode;
     }


Mime
View raw message