diff --git a/src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php b/src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php index 091cfc8b759..aa71da7ca19 100644 --- a/src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php +++ b/src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php @@ -524,6 +524,10 @@ private function processArrayItem(ArrayItem $arrayItem, MutatingScope $mutatingS } $arrayItem->value->setAttribute(AttributeKey::SCOPE, $mutatingScope); + + if ($arrayItem->value instanceof List_) { + $this->processArray($arrayItem->value, $mutatingScope); + } } /**