1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
This commit is contained in:
Daniil Gentili 2022-10-03 12:53:44 +02:00
parent 79b13fab04
commit 5984ccd908
2 changed files with 3 additions and 0 deletions

View File

@ -252,6 +252,7 @@ class TypeCombiner
if ($generic_type === 'iterable') {
$new_types[] = new TIterable($generic_type_params);
} else {
/** @psalm-suppress ArgumentTypeCoercion Caused by the above assignment */
$generic_object = new TGenericObject(
$generic_type,
$generic_type_params,
@ -270,6 +271,7 @@ class TypeCombiner
foreach ($combination->object_type_params as $generic_type => $generic_type_params) {
$generic_type = substr($generic_type, 0, (int) strpos($generic_type, '<'));
/** @psalm-suppress ArgumentTypeCoercion */
$generic_object = new TGenericObject(
$generic_type,
$generic_type_params,

View File

@ -177,6 +177,7 @@ class TypeExpander
$extra_types[$extra_type->getKey()] = $extra_type;
}
/** @psalm-suppress ArgumentTypeCoercion */
$return_type = $return_type->setIntersectionTypes(array_merge($extra_types, $new_intersection_types));
}