1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Evaluate loop part of for after body

This commit is contained in:
Matt Brown 2017-01-18 17:13:20 -05:00
parent b23c55e570
commit a2750a92aa

View File

@ -35,14 +35,14 @@ class ForChecker
}
}
$statements_checker->analyze($stmt->stmts, $for_context, $context);
foreach ($stmt->loop as $expr) {
if (ExpressionChecker::analyze($statements_checker, $expr, $for_context) === false) {
return false;
}
}
$statements_checker->analyze($stmt->stmts, $for_context, $context);
foreach ($context->vars_in_scope as $var => $type) {
if ($type->isMixed()) {
continue;