diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java index efad976f6b3..a2cc487417a 100644 --- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java +++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java @@ -134,8 +134,8 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean codeStream.iconst_1(); codeStream.goto_(continueLabel); falseLabel.place(); - for (LocalVariableBinding patternVariableBinding : this.pattern.bindingsWhenTrue()) { - codeStream.removeVariable(patternVariableBinding); + for (LocalVariableBinding binding : this.pattern.bindingsWhenTrue()) { + binding.recordInitializationEndPC(codeStream.position); } codeStream.iconst_0(); continueLabel.place();