Skip to content

Commit e178b94

Browse files
committed
Update IntersectionType.php
1 parent d57d50b commit e178b94

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Type/IntersectionType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $uni
984984
if (
985985
$this->isList()->yes()
986986
&& $offsetType !== null
987-
&& $offsetType->isInteger()->yes()
987+
&& $offsetType->toArrayKey()->isInteger()->yes()
988988
&& $this->getIterableValueType()->isArray()->yes()
989989
) {
990990
$result = TypeCombinator::intersect($result, new AccessoryArrayListType());

0 commit comments

Comments
 (0)