Skip to content
Permalink
Browse files

Add fix to more places

  • Loading branch information
muglug committed Jan 6, 2020
1 parent a212375 commit 8c71da75aff99a1c1ba4083e8e76458cc9fe526c
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOpAnalyzer.php
@@ -150,6 +150,13 @@ function ($c) use ($reconciled_expression_clauses) {
}
)
);

if (count($context_clauses) === 1
&& $context_clauses[0]->wedge
&& !$context_clauses[0]->possibilities
) {
$context_clauses = [];
}
}

$simplified_clauses = Algebra::simplifyCNF($context_clauses);
@@ -352,6 +359,13 @@ function ($c) use ($reconciled_expression_clauses) {
}
)
);

if (count($negated_left_clauses) === 1
&& $negated_left_clauses[0]->wedge
&& !$negated_left_clauses[0]->possibilities
) {
$negated_left_clauses = [];
}
}

$clauses_for_right_analysis = Algebra::simplifyCNF(

0 comments on commit 8c71da7

Please sign in to comment.
You can’t perform that action at this time.