Skip to content

Commit b88cf0a

Browse files
committed
Use isSuperTypeOf() instead of equals() in Bound check
1 parent e870ac1 commit b88cf0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Analyser/TypeSpecifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ private function specifyTypesFromAsserts(TypeSpecifierContext $context, Expr\Cal
15641564
static function (Type $type, callable $traverse) use ($templateTypeMap, &$containsUnresolvedTemplate) {
15651565
if ($type instanceof TemplateType && $type->getScope()->getClassName() !== null) {
15661566
$resolvedType = $templateTypeMap->getType($type->getName());
1567-
if ($resolvedType === null || $type->getBound()->equals($resolvedType)) {
1567+
if ($resolvedType === null || $resolvedType->isSuperTypeOf($type->getBound())->yes()) {
15681568
$containsUnresolvedTemplate = true;
15691569
return $type;
15701570
}

0 commit comments

Comments
 (0)