Skip to content

Commit

Permalink
handle the case where the expansion was not successful
Browse files Browse the repository at this point in the history
  • Loading branch information
orklah committed Jan 3, 2022
1 parent 60732d0 commit 6905dae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Psalm/Internal/Type/Comparator/UnionTypeComparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,9 @@ private static function getTypeParts(
true
);
if ($expanded instanceof Atomic) {
$atomic_types[] = $expanded;
if (!$expanded instanceof TTypeAlias && !$expanded instanceof TClassConstant) {
$atomic_types[] = $expanded;
}
continue;
}

Expand Down

0 comments on commit 6905dae

Please sign in to comment.