Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Oct 14, 2022
1 parent bb9aabe commit cf2dcb3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Psalm/Internal/Type/TypeExpander.php
Expand Up @@ -640,8 +640,12 @@ private static function expandNamedObject(
$return_type->is_static = true;
}
} elseif ($return_type->is_static
&& ($static_class_type instanceof TNamedObject
|| $static_class_type instanceof TTemplateParam)
&& (($static_class_type instanceof TNamedObject
&& $codebase->classlikes->classExtends(
$static_class_type->value,
$return_type->value
)
) || $static_class_type instanceof TTemplateParam)
) {
$return_type = clone $return_type;
$cloned_static = clone $static_class_type;
Expand Down

0 comments on commit cf2dcb3

Please sign in to comment.