From 950541173897ab289c7d1182de2a741180c32772 Mon Sep 17 00:00:00 2001 From: orklah Date: Sun, 15 Aug 2021 22:34:22 +0200 Subject: [PATCH] remove type by key instead of targetting global int --- src/Psalm/Internal/Type/SimpleAssertionReconciler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Internal/Type/SimpleAssertionReconciler.php b/src/Psalm/Internal/Type/SimpleAssertionReconciler.php index bb1f73831..9a018e7c5 100644 --- a/src/Psalm/Internal/Type/SimpleAssertionReconciler.php +++ b/src/Psalm/Internal/Type/SimpleAssertionReconciler.php @@ -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)); } }