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:
parent
d9d9fa67a6
commit
9505411738
@ -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));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user