aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoraclement <aclement>2005-12-02 11:06:37 +0000
committeraclement <aclement>2005-12-02 11:06:37 +0000
commit6d94d09c4bba8431d810019fe09e989fd026c3d1 (patch)
tree7596c86eabdc7fcbfdb328863a8a4d18ffeabb28 /org.aspectj.ajdt.core
parent99a8e7648584be91f418fb26714d25f402bfaff9 (diff)
downloadaspectj-6d94d09c4bba8431d810019fe09e989fd026c3d1.tar.gz
aspectj-6d94d09c4bba8431d810019fe09e989fd026c3d1.zip
test and fix for 118698
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeFieldBinding.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeFieldBinding.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeFieldBinding.java
index 7487cce49..66c91177e 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeFieldBinding.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeFieldBinding.java
@@ -82,7 +82,16 @@ public class InterTypeFieldBinding extends FieldBinding {
if (isPrivate()) {
// answer true if the receiverType is the declaringClass
// AND the invocationType and the declaringClass have a common enclosingType
- if (receiverType != declaringType) return false;
+
+ // Is the receiverType an innertype of the declaring type?
+ boolean receiverTypeIsSameOrInsideDeclaringType = receiverType == declaringType;
+ ReferenceBinding typeToCheckNext = receiverType.enclosingType();
+ while (!receiverTypeIsSameOrInsideDeclaringType && typeToCheckNext!=null) {
+ if (typeToCheckNext==declaringType) receiverTypeIsSameOrInsideDeclaringType=true;
+ }
+ if (!receiverTypeIsSameOrInsideDeclaringType) return false;
+ // the code above replaces this line: (pr118698)
+// if (receiverType != declaringType) return false;
if (invocationType != declaringType) {
ReferenceBinding outerInvocationType = invocationType;