mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Only include vars asserted in where
This commit is contained in:
parent
9a3049b5bc
commit
b1b7b0ae35
@ -68,9 +68,9 @@ class WhileChecker
|
||||
$while_context->vars_in_scope = $while_vars_in_scope_reconciled;
|
||||
}
|
||||
|
||||
$while_cond_vars = array_keys($reconcilable_while_types);
|
||||
$asserted_while_vars = array_keys(AlgebraChecker::getTruthsFromFormula($while_clauses));
|
||||
|
||||
if ($statements_checker->analyzeLoop($stmt->stmts, $while_cond_vars, $while_context, $context) === false) {
|
||||
if ($statements_checker->analyzeLoop($stmt->stmts, $asserted_while_vars, $while_context, $context) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user