1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00
This commit is contained in:
Daniil Gentili 2022-12-03 18:21:11 +01:00
parent ad5006bfb3
commit 3437d762af

View File

@ -398,7 +398,7 @@ class TKeyedArray extends Atomic
{
if ($this->is_list) {
foreach ($this->properties as $k => $property) {
if ($property->possibly_undefined) {
if ($property->possibly_undefined || $property->isNever()) {
/** @var int<0, max> */
return $k;
}
@ -407,7 +407,7 @@ class TKeyedArray extends Atomic
}
$prop_min_count = 0;
foreach ($this->properties as $property) {
if (!$property->possibly_undefined) {
if (!($property->possibly_undefined || $property->isNever())) {
$prop_min_count++;
}
}