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 cfe49a7 commit b6040db
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Psalm/Internal/Type/TypeExpander.php
Expand Up @@ -671,8 +671,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_types = $return_type->getIntersectionTypes();
$cloned_static = $static_class_type->setIntersectionTypes([]);
Expand Down

0 comments on commit b6040db

Please sign in to comment.