Skip to content

Commit

Permalink
Let's have a look
Browse files Browse the repository at this point in the history
  • Loading branch information
klimick committed May 8, 2024
1 parent 40156a4 commit 0cb630c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/Psalm/Internal/Type/TemplateStandinTypeReplacer.php
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,31 @@ private static function handleTemplateParamStandin(
}

if ($add_lower_bound && $input_type && !$template_result->readonly) {
$replacement_type = TypeExpander::expandUnion(
$codebase,
$replacement_type,
$calling_class,
$calling_class,
null,
);

if ($depth < 10) {
$replacement_type = self::replace(
$replacement_type,
$template_result,
$codebase,
$statements_analyzer,
$input_type,
$input_arg_offset,
$calling_class,
$calling_function,
true,
true,
$bound_equality_classlike,
$depth + 1,
);
}

$matching_input_keys = [];

if (UnionTypeComparator::canBeContainedBy(
Expand Down

0 comments on commit 0cb630c

Please sign in to comment.