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

handle the case where the expansion was not successful

This commit is contained in:
orklah 2022-01-03 23:30:36 +01:00
parent 60732d00ba
commit 6905daedd7

View File

@ -485,7 +485,9 @@ class UnionTypeComparator
true
);
if ($expanded instanceof Atomic) {
$atomic_types[] = $expanded;
if (!$expanded instanceof TTypeAlias && !$expanded instanceof TClassConstant) {
$atomic_types[] = $expanded;
}
continue;
}