Skip to content

Commit 3cbb9ba

Browse files
authored
Merge branch refs/heads/1.9.x into 1.10.x
2 parents f11d624 + cf2107d commit 3cbb9ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: src/Type/IterableType.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,11 @@ public function inferTemplateTypes(Type $receivedType): TemplateTypeMap
389389

390390
public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance): array
391391
{
392+
$variance = $positionVariance->compose(TemplateTypeVariance::createCovariant());
393+
392394
return array_merge(
393-
$this->getIterableKeyType()->getReferencedTemplateTypes($positionVariance),
394-
$this->getIterableValueType()->getReferencedTemplateTypes($positionVariance),
395+
$this->getIterableKeyType()->getReferencedTemplateTypes($variance),
396+
$this->getIterableValueType()->getReferencedTemplateTypes($variance),
395397
);
396398
}
397399

0 commit comments

Comments
 (0)