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

Fixup!!! make sure to add atomics with the correct offset key

This commit is contained in:
orklah 2022-01-05 09:58:56 +01:00
parent 36349a1370
commit 950710a47a

View File

@ -997,12 +997,14 @@ class AssertionReconciler extends Reconciler
);
if ($expanded instanceof Atomic) {
$existing_var_atomic_types[] = $expanded;
$existing_var_atomic_types[$expanded->getKey()] = $expanded;
} else {
array_push($existing_var_atomic_types, ...$expanded);
foreach ($expanded as $atomic_type) {
$existing_var_atomic_types[$atomic_type->getKey()] = $atomic_type;
}
}
} else {
$existing_var_atomic_types[] = $existing_var_atomic_type;
$existing_var_atomic_types[$existing_var_atomic_type->getKey()] = $existing_var_atomic_type;
}
}