1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 17:52:45 +01:00
This commit is contained in:
Daniil Gentili 2022-11-26 17:37:48 +01:00
parent 45c26d0cbf
commit d0d7c46d26
2 changed files with 13 additions and 2 deletions

View File

@ -80,9 +80,12 @@ class ArrayTypeComparator
}
if ($container_type_part instanceof TKeyedArray
&& $input_type_part instanceof TKeyedArray
&& $container_type_part->is_list
&& !$input_type_part->is_list
&& (
($input_type_part instanceof TKeyedArray
&& !$input_type_part->is_list)
|| $input_type_part instanceof TArray
)
) {
return false;
}

View File

@ -38,6 +38,14 @@ class KeyedArrayComparator
return false;
}
if ($container_type_part instanceof TKeyedArray
&& $container_type_part->is_list
&& $input_type_part instanceof TKeyedArray
&& !$input_type_part->is_list
) {
return false;
}
$all_types_contain = true;
$input_properties = $input_type_part->properties;