mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Fix vimeo/psalm#5255 (#5256)
This commit is contained in:
parent
3106635953
commit
1f84fdf110
@ -133,7 +133,9 @@ class ClosureAnalyzer extends FunctionLikeAnalyzer
|
||||
$context->vars_in_scope[$use_var_id] = Type::getMixed();
|
||||
}
|
||||
|
||||
if ($statements_analyzer->data_flow_graph instanceof \Psalm\Internal\Codebase\VariableUseGraph) {
|
||||
if ($statements_analyzer->data_flow_graph instanceof \Psalm\Internal\Codebase\VariableUseGraph
|
||||
&& $context->hasVariable($use_var_id)
|
||||
) {
|
||||
$parent_nodes = $context->vars_in_scope[$use_var_id]->parent_nodes;
|
||||
|
||||
foreach ($parent_nodes as $parent_node) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user