Skip to content

Commit dedaed7

Browse files
committed
Update ConstantArrayType.php
1 parent d3838df commit dedaed7

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

src/Type/Constant/ConstantArrayType.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3186,10 +3186,6 @@ public function mapValueType(callable $cb): Type
31863186
$newValueTypes[] = $cb($valueType);
31873187
}
31883188

3189-
// A sealed array's unsealed value type is the explicit-never sentinel for
3190-
// "no extra elements". Mapping it through $cb would invent a bogus type for
3191-
// elements that cannot exist (e.g. an ErrorType from an enum property fetch
3192-
// on never), so leave the sentinel untouched.
31933189
$newUnsealed = $this->unsealed === null || $this->isUnsealed()->no()
31943190
? $this->unsealed
31953191
: [$this->unsealed[0], $cb($this->unsealed[1])];

0 commit comments

Comments
 (0)