Skip to content

Commit b9f805f

Browse files
committed
Remove incorrect optimization in getUnionConstraintOfIntersection
1 parent 4fee628 commit b9f805f

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/compiler/checker.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7598,11 +7598,6 @@ namespace ts {
75987598
constraint = getConstraintOfType(constraint);
75997599
}
76007600
if (constraint) {
7601-
// A constraint that isn't a union type implies that the final type would be a non-union
7602-
// type as well. Since non-union constraints are of no interest, we can exit here.
7603-
if (!(constraint.flags & TypeFlags.Union)) {
7604-
return undefined;
7605-
}
76067601
constraints = append(constraints, constraint);
76077602
}
76087603
}

0 commit comments

Comments
 (0)