1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 10:07:52 +01:00

Possible fix

This commit is contained in:
Daniil Gentili 2022-12-02 13:36:05 +01:00
parent 7e571f4df1
commit b8ffb3163c

View File

@ -667,6 +667,12 @@ class TypeCombiner
$codebase,
$overwrite_empty_array
);
if ((!$value_type->possibly_undefined || !$candidate_property_type->possibly_undefined)
&& $overwrite_empty_array
) {
$combination->objectlike_entries[$candidate_property_name] =
$combination->objectlike_entries[$candidate_property_name]->setPossiblyUndefined(false);
}
}
if (!$candidate_property_type->possibly_undefined) {