1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-07 13:42:11 +01:00
This commit is contained in:
Daniil Gentili 2022-12-02 21:14:02 +01:00
parent 78d64e3604
commit 3ce782f0f1

View File

@ -564,8 +564,10 @@ class SimpleNegatedAssertionReconciler extends Reconciler
$properties []= $array_atomic_type->properties[$x] $properties []= $array_atomic_type->properties[$x]
?? $array_atomic_type->fallback_params[1]->setPossiblyUndefined(true); ?? $array_atomic_type->fallback_params[1]->setPossiblyUndefined(true);
} }
assert($properties !== []);
$existing_var_type->removeType('array'); $existing_var_type->removeType('array');
if (!$properties) {
$existing_var_type->addType(Type::getEmptyArrayAtomic());
} else {
$existing_var_type->addType(new TKeyedArray( $existing_var_type->addType(new TKeyedArray(
$properties, $properties,
null, null,
@ -574,6 +576,7 @@ class SimpleNegatedAssertionReconciler extends Reconciler
$array_atomic_type->from_docblock $array_atomic_type->from_docblock
)); ));
} }
}
$redundant = false; $redundant = false;
} }
} else { } else {