diff options
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java')
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java index 331bd262b..004ddafbd 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java @@ -55,7 +55,7 @@ import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; import org.eclipse.jdt.internal.compiler.codegen.CodeStream; import org.eclipse.jdt.internal.compiler.codegen.ConstantPool; import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; -import org.eclipse.jdt.internal.compiler.flow.ExceptionHandlingFlowContext; +import org.eclipse.jdt.internal.compiler.flow.FieldInitsFakingFlowContext; import org.eclipse.jdt.internal.compiler.flow.FlowContext; import org.eclipse.jdt.internal.compiler.flow.FlowInfo; import org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo; @@ -243,7 +243,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx IErrorHandlingPolicy oldPolicy = currentScope.problemReporter().switchErrorHandlingPolicy(silentErrorHandlingPolicy); try { implicitLambda.analyseCode(currentScope, - new ExceptionHandlingFlowContext(null, this, Binding.NO_EXCEPTIONS, null, currentScope, FlowInfo.DEAD_END), + new FieldInitsFakingFlowContext(null, this, Binding.NO_EXCEPTIONS, null, currentScope, FlowInfo.DEAD_END), UnconditionalFlowInfo.fakeInitializedFlowInfo(currentScope.outerMostMethodScope().analysisIndex, currentScope.referenceType().maxFieldCount)); } finally { currentScope.problemReporter().switchErrorHandlingPolicy(oldPolicy); @@ -288,7 +288,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx if (this.binding != null && isMethodReference()) { if (TypeBinding.notEquals(this.binding.declaringClass, this.lhs.resolvedType.erasure())) { if (!this.binding.declaringClass.canBeSeenBy(currentScope)) { - this.binding = new MethodBinding(this.binding, (ReferenceBinding) this.lhs.resolvedType.erasure()); + this.binding = new MethodBinding(this.binding.original(), (ReferenceBinding) this.lhs.resolvedType.erasure()); } } } @@ -415,8 +415,8 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { // static methods with receiver value never get here if (this.haveReceiver) { - this.lhs.checkNPE(currentScope, flowContext, flowInfo); this.lhs.analyseCode(currentScope, flowContext, flowInfo, true); + this.lhs.checkNPE(currentScope, flowContext, flowInfo); } else if (isConstructorReference()) { TypeBinding type = this.receiverType.leafComponentType(); if (type.isNestedType() && |