Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Arthanareeswaran2020-09-16 03:59:22 +0000
committerJay Arthanareeswaran2020-09-16 03:59:22 +0000
commit27b53ca171a19db4794ec310f4e339e876ea495f (patch)
tree3b12fd95b0afb9a5401d836d115751d13588c5c0 /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java
parenta8b03f929def2f6a9f479a198856e34e6cd4af34 (diff)
parent0a27063a3e6012ba850fd756f98be50be0375dc3 (diff)
downloadeclipse.jdt.core-27b53ca171a19db4794ec310f4e339e876ea495f.tar.gz
eclipse.jdt.core-27b53ca171a19db4794ec310f4e339e876ea495f.tar.xz
eclipse.jdt.core-27b53ca171a19db4794ec310f4e339e876ea495f.zip
Merge remote-tracking branch 'origin/BETA_JAVA15'
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java
index 422cc4420f..478d32d408 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java
@@ -272,7 +272,21 @@ public class AND_AND_Expression extends BinaryExpression {
codeStream.removeNotDefinitelyAssignedVariables(currentScope, this.mergedInitStateIndex);
}
}
+ @Override
+ public void collectPatternVariablesToScope(LocalVariableBinding[] variables, BlockScope scope) {
+ this.left.collectPatternVariablesToScope(this.patternVarsWhenTrue, scope);
+
+ variables = this.left.getPatternVariablesWhenTrue();
+ this.addPatternVariablesWhenTrue(variables);
+ this.right.addPatternVariablesWhenTrue(variables);
+ variables = this.left.getPatternVariablesWhenFalse();
+ this.right.addPatternVariablesWhenFalse(variables);
+
+ this.right.collectPatternVariablesToScope(this.patternVarsWhenTrue, scope);
+ variables = this.right.getPatternVariablesWhenTrue();
+ this.addPatternVariablesWhenTrue(variables);
+ }
@Override
public boolean isCompactableOperation() {
return false;

Back to the top