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

bugfix: pass non-empty information when reconciling iterable

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This commit is contained in:
Maximilian Bösing 2023-06-23 21:15:37 +02:00
parent 2d84b06cfa
commit f482a5cb31
No known key found for this signature in database
GPG Key ID: 9A8988C93CEC81A3

View File

@ -2441,7 +2441,9 @@ class SimpleAssertionReconciler extends Reconciler
$redundant = false;
} elseif ($type instanceof TIterable) {
$array_types[] = Type::getListAtomic($type->type_params[1]);
$array_types[] = $is_non_empty
? Type::getNonEmptyListAtomic($type->type_params[1])
: Type::getListAtomic($type->type_params[1]);
$redundant = false;
} else {