From 0106746e60263d8cc3fbd189cca7b2e09c3d5c06 Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Wed, 17 Feb 2021 09:41:08 +0100 Subject: [fixes #2752] Save problem handler state for postponed error handling --- src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/eclipseAgent/lombok/eclipse') diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java b/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java index 5f229955..fd8a13b7 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java @@ -55,6 +55,7 @@ import org.eclipse.jdt.internal.compiler.ast.SingleNameReference; import org.eclipse.jdt.internal.compiler.ast.SuperReference; import org.eclipse.jdt.internal.compiler.ast.ThisReference; import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; +import org.eclipse.jdt.internal.compiler.impl.ReferenceContext; import org.eclipse.jdt.internal.compiler.lookup.Binding; import org.eclipse.jdt.internal.compiler.lookup.BlockScope; import org.eclipse.jdt.internal.compiler.lookup.MethodBinding; @@ -143,14 +144,17 @@ public class PatchExtensionMethod { private final ProblemReporter problemReporter; private ASTNode location; private MethodBinding method; + private ReferenceContext referenceContext; PostponedNonStaticAccessToStaticMethodError(ProblemReporter problemReporter, ASTNode location, MethodBinding method) { this.problemReporter = problemReporter; this.location = location; this.method = method; + this.referenceContext = problemReporter.referenceContext; } public void fire() { + problemReporter.referenceContext = this.referenceContext; problemReporter.nonStaticAccessToStaticMethod(location, method); } } -- cgit