1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

fix wrong assertion

This commit is contained in:
orklah 2021-09-13 19:24:49 +02:00
parent 3d7dc740c2
commit 086d3777eb

View File

@ -1695,7 +1695,6 @@ class SimpleNegatedAssertionReconciler extends Reconciler
if (!$new_range->contains($atomic_type->value)) {
//emit an issue here in the future about incompatible type
$existing_var_type->removeType($atomic_type->getKey());
$existing_var_type->addType($new_range);
} /*elseif ($inside_loop) {
//when inside a loop, allow the range to extends the type
$existing_var_type->removeType($atomic_type->getKey());
@ -1741,7 +1740,6 @@ class SimpleNegatedAssertionReconciler extends Reconciler
if (!$new_range->contains($atomic_type->value)) {
//emit an issue here in the future about incompatible type
$existing_var_type->removeType($atomic_type->getKey());
$existing_var_type->addType($new_range);
}/* elseif ($inside_loop) {
//when inside a loop, allow the range to extends the type
$existing_var_type->removeType($atomic_type->getKey());