mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 02:30:15 -06:00
Correct bottoming-out tracing for recursiveTypeRelatedTo
This commit is contained in:
parent
36489ff5c6
commit
ef1481c8a4
@ -16882,6 +16882,17 @@ namespace ts {
|
||||
return originalHandler!(onlyUnreliable);
|
||||
};
|
||||
}
|
||||
|
||||
if (expandingFlags === ExpandingFlags.Both) {
|
||||
tracing.instant(tracing.Phase.Check, "recursiveTypeRelatedTo_DepthLimit", {
|
||||
sourceId: source.id,
|
||||
sourceIdStack: sourceStack.map(t => t.id),
|
||||
targetId: target.id,
|
||||
targetIdStack: targetStack.map(t => t.id),
|
||||
depth,
|
||||
});
|
||||
}
|
||||
|
||||
const result = expandingFlags !== ExpandingFlags.Both ? structuredTypeRelatedTo(source, target, reportErrors, intersectionState) : Ternary.Maybe;
|
||||
if (outofbandVarianceMarkerHandler) {
|
||||
outofbandVarianceMarkerHandler = originalHandler;
|
||||
@ -18287,7 +18298,6 @@ namespace ts {
|
||||
if (getRecursionIdentity(stack[i]) === identity) {
|
||||
count++;
|
||||
if (count >= 5) {
|
||||
tracing.instant(tracing.Phase.Check, "isDeeplyNestedType_DepthLimit", { typeId: type.id, typeIdStack: stack.map(t => t.id), depth, count });
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user