diff options
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java')
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java index 2e52f5a05e..6e7970e621 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java @@ -549,9 +549,10 @@ public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo f // if method from parameterized type got found, use the original method at codegen time MethodBinding codegenBinding = this.binding.original(); if (this.binding.isPrivate()){ - + boolean useNesting = currentScope.enclosingSourceType().isNestmateOf(codegenBinding.declaringClass) && + !(this.receiver instanceof QualifiedSuperReference); // depth is set for both implicit and explicit access (see MethodBinding#canBeSeenBy) - if (!currentScope.enclosingSourceType().isNestmateOf(codegenBinding.declaringClass) && + if (!useNesting && TypeBinding.notEquals(currentScope.enclosingSourceType(), codegenBinding.declaringClass)){ this.syntheticAccessor = ((SourceTypeBinding)codegenBinding.declaringClass).addSyntheticMethod(codegenBinding, false /* not super access there */); currentScope.problemReporter().needToEmulateMethodAccess(codegenBinding, this); |