1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00

Within the reconciler's fast path, do not require the existing type to include mixed when handling an Any assertion.

This commit is contained in:
Peter van Dommelen 2022-09-18 17:07:30 +02:00
parent 05f28ce8cd
commit 2eb4ca0e3b

View File

@ -105,7 +105,7 @@ class SimpleAssertionReconciler extends Reconciler
int &$failed_reconciliation = Reconciler::RECONCILIATION_OK,
bool $inside_loop = false
): ?Union {
if ($assertion instanceof Any && $existing_var_type->hasMixed()) {
if ($assertion instanceof Any) {
return $existing_var_type;
}