File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -3567,28 +3567,14 @@ module ts {
3567
3567
return false;
3568
3568
}
3569
3569
3570
- // Since removeSubtypes checks the subtype relation, and the subtype relation on a union
3571
- // may attempt to reduce a union, it is possible that removeSubtypes could be called
3572
- // recursively on the same set of types. The removeSubtypesStack is used to track which
3573
- // sets of types are currently undergoing subtype reduction.
3574
- let removeSubtypesStack: string[] = [];
3575
3570
function removeSubtypes(types: Type[]) {
3576
- let typeListId = getTypeListId(types);
3577
- if (removeSubtypesStack.lastIndexOf(typeListId) >= 0) {
3578
- return;
3579
- }
3580
-
3581
- removeSubtypesStack.push(typeListId);
3582
-
3583
3571
let i = types.length;
3584
3572
while (i > 0) {
3585
3573
i--;
3586
3574
if (isSubtypeOfAny(types[i], types)) {
3587
3575
types.splice(i, 1);
3588
3576
}
3589
3577
}
3590
-
3591
- removeSubtypesStack.pop();
3592
3578
}
3593
3579
3594
3580
function containsAnyType(types: Type[]) {
You can’t perform that action at this time.
0 commit comments