Skip to content

Commit

Permalink
workaround for false positives caused by #9484
Browse files Browse the repository at this point in the history
  • Loading branch information
ptomulik committed Mar 10, 2023
1 parent 8e90b7e commit e25c416
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Psalm/Internal/Type/TypeCombiner.php
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e25c416

Please sign in to comment.