Skip to content

Commit

Permalink
Ensure no duplicates in named union list
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg committed Feb 24, 2021
1 parent 26bbdf1 commit 361e19b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13460,7 +13460,7 @@ namespace ts {
if (t.flags & TypeFlags.Union) {
const origin = (<UnionType>t).origin;
if (t.aliasSymbol || origin && !(origin.flags & TypeFlags.Union)) {
namedUnions.push(t);
pushIfUnique(namedUnions, t);
}
else if (origin && origin.flags & TypeFlags.Union) {
addNamedUnions(namedUnions, (<UnionType>origin).types);
Expand Down

0 comments on commit 361e19b

Please sign in to comment.