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

remove type by key instead of targetting global int

This commit is contained in:
orklah 2021-08-15 22:34:22 +02:00
parent d9d9fa67a6
commit 9505411738

View File

@ -1618,7 +1618,7 @@ class SimpleAssertionReconciler extends \Psalm\Type\Reconciler
}
}*/
} elseif ($atomic_type instanceof TInt) {
$existing_var_type->removeType('int');
$existing_var_type->removeType($atomic_type->getKey());
$existing_var_type->addType(new Atomic\TIntRange((int)$assertion, null));
}
}
@ -1660,7 +1660,7 @@ class SimpleAssertionReconciler extends \Psalm\Type\Reconciler
}
}*/
} elseif ($atomic_type instanceof TInt) {
$existing_var_type->removeType('int');
$existing_var_type->removeType($atomic_type->getKey());
$existing_var_type->addType(new Atomic\TIntRange(null, (int)$assertion));
}
}