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

Propagate has_returned flag

This commit is contained in:
Brown 2020-09-22 00:43:13 -04:00
parent 3015aca2df
commit 275c6bf4e7

View File

@ -525,6 +525,10 @@ class TryAnalyzer
$statements_analyzer->analyze($stmt->finally->stmts, $finally_context);
if ($finally_context->has_returned) {
$context->has_returned;
}
/** @var string $var_id */
foreach ($finally_context->assigned_var_ids as $var_id => $_) {
if (isset($context->vars_in_scope[$var_id])) {