1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00
This commit is contained in:
Paweł Tomulik 2023-02-26 16:35:35 +01:00
parent 68fc72e139
commit 78e6545d7f
No known key found for this signature in database
GPG Key ID: 383742B6D85FF3D5

View File

@ -514,11 +514,8 @@ class ArrayAssignmentAnalyzer
$array_atomic_key_type = Type::getArrayKey();
}
if ($offset_already_existed
&& $parent_var_id
&& ($parent_type = $context->vars_in_scope[$parent_var_id] ?? null)
) {
if ($parent_type->hasList() && strpos($parent_var_id, '[') === false) {
if ($parent_var_id && ($parent_type = $context->vars_in_scope[$parent_var_id] ?? null)) {
if ($offset_already_existed && $parent_type->hasList() && strpos($parent_var_id, '[') === false) {
$array_atomic_type_list = $value_type;
} elseif ($parent_type->hasClassStringMap()
&& $key_type