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

Allow false to be removed from scalar

Fixes #3829
This commit is contained in:
Brown 2020-07-21 13:02:13 -04:00
parent ae89a71c84
commit 8ed9007355

View File

@ -435,7 +435,7 @@ class SimpleNegatedAssertionReconciler extends Reconciler
bool $is_equality bool $is_equality
) : Type\Union { ) : Type\Union {
$old_var_type_string = $existing_var_type->getId(); $old_var_type_string = $existing_var_type->getId();
$did_remove_type = false; $did_remove_type = $existing_var_type->hasScalar();
if ($existing_var_type->hasType('false')) { if ($existing_var_type->hasType('false')) {
$did_remove_type = true; $did_remove_type = true;