Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Arthanareeswaran2020-09-10 06:52:11 -0400
committerJay Arthanareeswaran2020-09-10 06:52:46 -0400
commit9814c1988617415262415702247c12108722d240 (patch)
tree6b5601f1e59a2236b2bf03b13675e11879aa191c
parentdbd194a7f455e4fd8f29ea2b000241b8aa6a3c6d (diff)
downloadeclipse.jdt.core-9814c1988617415262415702247c12108722d240.tar.gz
eclipse.jdt.core-9814c1988617415262415702247c12108722d240.tar.xz
eclipse.jdt.core-9814c1988617415262415702247c12108722d240.zip
InstanceOfExpression as final non-sealed Compiler related change Change-Id: Ie4622951b4083652fcad69d6e8944f566e7af082 Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
index 14e8f0fce5..24fb1ff268 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
@@ -256,6 +256,9 @@ public boolean resolvePatternVariable(BlockScope scope) {
if (this.elementVariable == null) return false;
if (this.elementVariable.binding == null) {
this.elementVariable.resolve(scope, true);
+ // Kludge - to remove the AccBlankFinal added by the LocalDeclaration#resolve() due to the
+ // missing initializer
+ this.elementVariable.modifiers &= ~ExtraCompilerModifiers.AccBlankFinal;
this.elementVariable.binding.modifiers |= ExtraCompilerModifiers.AccPatternVariable;
this.elementVariable.binding.modifiers |= ExtraCompilerModifiers.AccUnresolved; // TODO: Change to a different mechanism
this.elementVariable.binding.useFlag = LocalVariableBinding.USED;

Back to the top