diff --git a/src/Psalm/Internal/Type/TypeCombiner.php b/src/Psalm/Internal/Type/TypeCombiner.php index 85aad52b0d6..b4ce6bc94ea 100644 --- a/src/Psalm/Internal/Type/TypeCombiner.php +++ b/src/Psalm/Internal/Type/TypeCombiner.php @@ -551,6 +551,8 @@ private static function scrapeTypeProperties( } foreach ($type->type_params as $i => $type_param) { + // See https://github.com/vimeo/psalm/pull/9439#issuecomment-1464563015 + /** @psalm-suppress PropertyTypeCoercion */ $combination->array_type_params[$i] = Type::combineUnionTypes( $combination->array_type_params[$i] ?? null, $type_param, @@ -599,6 +601,8 @@ private static function scrapeTypeProperties( if ($type instanceof TClassStringMap) { foreach ([$type->getStandinKeyParam(), $type->value_param] as $i => $type_param) { + // See https://github.com/vimeo/psalm/pull/9439#issuecomment-1464563015 + /** @psalm-suppress PropertyTypeCoercion */ $combination->array_type_params[$i] = Type::combineUnionTypes( $combination->array_type_params[$i] ?? null, $type_param,