diff options
author | Jay Arthanareeswaran | 2020-09-10 10:52:11 +0000 |
---|---|---|
committer | Jay Arthanareeswaran | 2020-09-10 10:52:46 +0000 |
commit | 9814c1988617415262415702247c12108722d240 (patch) | |
tree | 6b5601f1e59a2236b2bf03b13675e11879aa191c | |
parent | dbd194a7f455e4fd8f29ea2b000241b8aa6a3c6d (diff) | |
download | eclipse.jdt.core-9814c1988617415262415702247c12108722d240.tar.gz eclipse.jdt.core-9814c1988617415262415702247c12108722d240.tar.xz eclipse.jdt.core-9814c1988617415262415702247c12108722d240.zip |
Bug 565447 - [15] ASTConverter showing pattern variable forY20200913-1200Y20200912-1200Y20200911-1200Y20200910-1200P20200914-0010
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.java | 3 |
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; |