groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From emil...@apache.org
Subject [groovy] 01/02: make backing field synthetic
Date Tue, 10 Dec 2019 17:14:53 GMT
This is an automated email from the ASF dual-hosted git repository.

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

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

    make backing field synthetic
---
 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