groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [groovy] 01/06: make backing field synthetic
Date Wed, 11 Dec 2019 10:44:36 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit a0c7d82b37f1ec3571c3fdf539b0ea42c3f1484a
Author: Eric Milles <eric.milles@thomsonreuters.com>
AuthorDate: Tue Dec 10 10:09:26 2019 -0600

    make backing field synthetic
    
    (cherry picked from commit a61180d86caefc5ae666a59e887d05b2884a67f7)
---
 src/main/java/org/codehaus/groovy/transform/LazyASTTransformation.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/codehaus/groovy/transform/LazyASTTransformation.java b/src/main/java/org/codehaus/groovy/transform/LazyASTTransformation.java
index 47ae674..58fd226 100644
--- a/src/main/java/org/codehaus/groovy/transform/LazyASTTransformation.java
+++ b/src/main/java/org/codehaus/groovy/transform/LazyASTTransformation.java
@@ -87,7 +87,7 @@ public class LazyASTTransformation extends AbstractASTTransformation {
 
         String backingFieldName = "$" + fieldNode.getName();
         fieldNode.rename(backingFieldName);
-        fieldNode.setModifiers(ACC_PRIVATE | (fieldNode.getModifiers() & (~(ACC_PUBLIC
| ACC_PROTECTED))));
+        fieldNode.setModifiers(ACC_PRIVATE | ACC_SYNTHETIC | (fieldNode.getModifiers() &
(~(ACC_PUBLIC | ACC_PROTECTED))));
         PropertyNode pNode = fieldNode.getDeclaringClass().getProperty(backingFieldName);
         if (pNode != null) {
             fieldNode.getDeclaringClass().getProperties().remove(pNode);


Mime
View raw message