mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Prevent empty type array when evaluating !falsy
This commit is contained in:
parent
e0cea0017c
commit
018843fe65
@ -344,17 +344,15 @@ class TypeChecker
|
||||
// fall through
|
||||
}
|
||||
}
|
||||
|
||||
if ($existing_var_type->types) {
|
||||
return $existing_var_type;
|
||||
}
|
||||
|
||||
$failed_reconciliation = true;
|
||||
|
||||
return Type::getMixed();
|
||||
}
|
||||
|
||||
return $existing_var_type;
|
||||
if ($existing_var_type->types) {
|
||||
return $existing_var_type;
|
||||
}
|
||||
|
||||
$failed_reconciliation = true;
|
||||
|
||||
return Type::getMixed();
|
||||
}
|
||||
|
||||
if ($new_var_type === '!null' && !$existing_var_type->isMixed()) {
|
||||
|
Loading…
Reference in New Issue
Block a user