1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Get LHS clauses of && expression after evaluation

This commit is contained in:
Matthew Brown 2017-12-03 18:33:54 -05:00
parent 02dcb2be95
commit 69ca6bd0a0

View File

@ -812,10 +812,6 @@ class ExpressionChecker
$statements_checker
);
$simplified_clauses = AlgebraChecker::simplifyCNF(array_merge($context->clauses, $if_clauses));
$left_type_assertions = AlgebraChecker::getTruthsFromFormula($simplified_clauses);
$pre_referenced_var_ids = $context->referenced_var_ids;
$context->referenced_var_ids = [];
@ -832,6 +828,10 @@ class ExpressionChecker
$new_referenced_var_ids = array_diff_key($new_referenced_var_ids, $new_assigned_var_ids);
$simplified_clauses = AlgebraChecker::simplifyCNF(array_merge($context->clauses, $if_clauses));
$left_type_assertions = AlgebraChecker::getTruthsFromFormula($simplified_clauses);
$changed_var_ids = [];
// while in an and, we allow scope to boil over to support