aboutsummaryrefslogtreecommitdiff
path: root/src/testA
diff options
context:
space:
mode:
authorJonas Herzig <jonas@spark-squared.com>2021-11-12 14:19:18 +0100
committerJonas Herzig <jonas@spark-squared.com>2021-11-13 10:28:09 +0100
commit358136a97feff6fd0586fe04a39adbc7ced381c1 (patch)
treef632b21008fa758d25632b51b0dab9aefd8eb599 /src/testA
parent3ee08cbce94a4e7e1ce668f06f5a612cd9f1e677 (diff)
downloadRemap-358136a97feff6fd0586fe04a39adbc7ced381c1.tar.gz
Remap-358136a97feff6fd0586fe04a39adbc7ced381c1.tar.bz2
Remap-358136a97feff6fd0586fe04a39adbc7ced381c1.zip
Consider location of expression when determining field accessibility
A protected field is not accessible unless we are referencing it from within a class which extends its owner. Therefore, we may use a synthetic property with the same name as long as we do not have access to the field.
Diffstat (limited to 'src/testA')
-rw-r--r--src/testA/java/a/pkg/A.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testA/java/a/pkg/A.java b/src/testA/java/a/pkg/A.java
index f4a30ef..1a0dcac 100644
--- a/src/testA/java/a/pkg/A.java
+++ b/src/testA/java/a/pkg/A.java
@@ -67,6 +67,11 @@ public class A extends AParent implements AInterface {
return conflictingField;
}
+ protected int protectedField;
+ public int getProtectedFieldWithoutConflict() {
+ return protectedField;
+ }
+
public void aOverloaded() {
}