mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 17:52:45 +01:00
Fixes
This commit is contained in:
parent
e7f2fddf34
commit
e89609bbab
@ -50,7 +50,7 @@ class KeyedArrayComparator
|
||||
|
||||
$input_properties = $input_type_part->properties;
|
||||
foreach ($container_type_part->properties as $key => $container_property_type) {
|
||||
if (!isset($input_properties[$key]) || $input_properties[$key]->possibly_undefined) {
|
||||
if (!isset($input_properties[$key])) {
|
||||
if (!$container_property_type->possibly_undefined) {
|
||||
$all_types_contain = false;
|
||||
}
|
||||
@ -58,6 +58,14 @@ class KeyedArrayComparator
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($input_properties[$key]->possibly_undefined
|
||||
&& !$container_property_type->possibly_undefined
|
||||
) {
|
||||
$all_types_contain = false;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$input_property_type = $input_properties[$key];
|
||||
unset($input_properties[$key]);
|
||||
|
||||
|
@ -279,13 +279,6 @@ class ScalarTypeComparator
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($container_type_part instanceof TIntRange
|
||||
&& $container_type_part->dependent_list_key
|
||||
&& $input_type_part instanceof TLiteralInt
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (get_class($container_type_part) === TFloat::class && $input_type_part instanceof TLiteralFloat) {
|
||||
return true;
|
||||
}
|
||||
@ -336,13 +329,6 @@ class ScalarTypeComparator
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($container_type_part instanceof TIntRange
|
||||
&& $container_type_part->dependent_list_key
|
||||
&& $input_type_part instanceof TInt
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (get_class($input_type_part) === TInt::class && $container_type_part instanceof TLiteralInt) {
|
||||
if ($atomic_comparison_result) {
|
||||
$atomic_comparison_result->type_coerced = true;
|
||||
|
Loading…
Reference in New Issue
Block a user