mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
Pass correct flags when referencing from finally
This commit is contained in:
parent
d393b4a69d
commit
6aa052475a
@ -84,6 +84,8 @@ class BreakAnalyzer
|
||||
}
|
||||
} else {
|
||||
$context->finally_scope->vars_in_scope[$var_id] = $type;
|
||||
$type->possibly_undefined = true;
|
||||
$type->possibly_undefined_from_try = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,6 +103,8 @@ class ContinueAnalyzer
|
||||
}
|
||||
} else {
|
||||
$context->finally_scope->vars_in_scope[$var_id] = $type;
|
||||
$type->possibly_undefined = true;
|
||||
$type->possibly_undefined_from_try = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -192,6 +192,8 @@ class ReturnAnalyzer
|
||||
}
|
||||
} else {
|
||||
$context->finally_scope->vars_in_scope[$var_id] = $type;
|
||||
$type->possibly_undefined = true;
|
||||
$type->possibly_undefined_from_try = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,8 @@ class ThrowAnalyzer
|
||||
}
|
||||
} else {
|
||||
$context->finally_scope->vars_in_scope[$var_id] = $type;
|
||||
$type->possibly_undefined = true;
|
||||
$type->possibly_undefined_from_try = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user