Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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.java5
1 files changed, 5 insertions, 0 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 aeb70372a..c3cd48361 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
@@ -214,6 +214,11 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
if (nonStatic) {
this.receiver.checkNPE(currentScope, flowContext, flowInfo);
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=318682
+ if (this.receiver.isThis() || this.receiver.isSuper()) {
+ // accessing non-static method without an object
+ currentScope.resetDeclaringClassMethodStaticFlag(this.actualReceiverType);
+ }
}
if (this.arguments != null) {

Back to the top