Skip to content

Commit e6fb781

Browse files
committed
Merge branch 2.1.x into 2.2.x
2 parents f638910 + eb68e9a commit e6fb781

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Type/IntersectionType.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ class IntersectionType implements CompoundType
8686

8787
private ?TrinaryLogic $isOversizedArray = null;
8888

89+
private ?TrinaryLogic $isOffsetAccessible = null;
90+
8991
private ?TrinaryLogic $isIterableAtLeastOnce = null;
9092

9193
private ?TrinaryLogic $isConstantScalarValue = null;
@@ -862,7 +864,7 @@ public function looseCompare(Type $type, PhpVersion $phpVersion): BooleanType
862864

863865
public function isOffsetAccessible(): TrinaryLogic
864866
{
865-
return $this->intersectResults(static fn (Type $type): TrinaryLogic => $type->isOffsetAccessible());
867+
return $this->isOffsetAccessible ??= $this->intersectResults(static fn (Type $type): TrinaryLogic => $type->isOffsetAccessible());
866868
}
867869

868870
public function isOffsetAccessLegal(): TrinaryLogic

0 commit comments

Comments
 (0)