From 358136a97feff6fd0586fe04a39adbc7ced381c1 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Fri, 12 Nov 2021 14:19:18 +0100 Subject: 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. --- src/test/resources/mappings.srg | 1 + 1 file changed, 1 insertion(+) (limited to 'src/test/resources') diff --git a/src/test/resources/mappings.srg b/src/test/resources/mappings.srg index f8255aa..65cad17 100644 --- a/src/test/resources/mappings.srg +++ b/src/test/resources/mappings.srg @@ -17,6 +17,7 @@ MD: a/pkg/A/getterBooleanA ()Z; b/pkg/B/isNonSyntheticBooleanB ()Z; MD: a/pkg/A/setterBooleanA (Z)V; b/pkg/B/setNonSyntheticBooleanB (Z)V; FD: a/pkg/A/conflictingField b/pkg/B/conflictingField MD: a/pkg/A/getConflictingFieldWithoutConflict ()I; b/pkg/B/getConflictingField ()I; +MD: a/pkg/A/getProtectedFieldWithoutConflict ()I b/pkg/B/getProtectedField ()I MD: a/pkg/A/aOverloaded ()V b/pkg/B/bOverloaded ()V MD: a/pkg/A/aOverloaded (I)V b/pkg/B/bOverloaded (I)V MD: a/pkg/A/aOverloaded (Z)V b/pkg/B/bOverloaded (Z)V -- cgit