diff --git a/src/Analyser/TypeSpecifier.php b/src/Analyser/TypeSpecifier.php index 6698a8a800..4d8b0b3bbf 100644 --- a/src/Analyser/TypeSpecifier.php +++ b/src/Analyser/TypeSpecifier.php @@ -1564,7 +1564,7 @@ private function specifyTypesFromAsserts(TypeSpecifierContext $context, Expr\Cal static function (Type $type, callable $traverse) use ($templateTypeMap, &$containsUnresolvedTemplate) { if ($type instanceof TemplateType && $type->getScope()->getClassName() !== null) { $resolvedType = $templateTypeMap->getType($type->getName()); - if ($resolvedType === null || $type->getBound()->equals($resolvedType)) { + if ($resolvedType === null || $resolvedType->isSuperTypeOf($type->getBound())->yes()) { $containsUnresolvedTemplate = true; return $type; }