Skip to content

Commit ef1481c

Browse files
committed
Correct bottoming-out tracing for recursiveTypeRelatedTo
1 parent 36489ff commit ef1481c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/compiler/checker.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16882,6 +16882,17 @@ namespace ts {
1688216882
return originalHandler!(onlyUnreliable);
1688316883
};
1688416884
}
16885+
16886+
if (expandingFlags === ExpandingFlags.Both) {
16887+
tracing.instant(tracing.Phase.Check, "recursiveTypeRelatedTo_DepthLimit", {
16888+
sourceId: source.id,
16889+
sourceIdStack: sourceStack.map(t => t.id),
16890+
targetId: target.id,
16891+
targetIdStack: targetStack.map(t => t.id),
16892+
depth,
16893+
});
16894+
}
16895+
1688516896
const result = expandingFlags !== ExpandingFlags.Both ? structuredTypeRelatedTo(source, target, reportErrors, intersectionState) : Ternary.Maybe;
1688616897
if (outofbandVarianceMarkerHandler) {
1688716898
outofbandVarianceMarkerHandler = originalHandler;
@@ -18287,7 +18298,6 @@ namespace ts {
1828718298
if (getRecursionIdentity(stack[i]) === identity) {
1828818299
count++;
1828918300
if (count >= 5) {
18290-
tracing.instant(tracing.Phase.Check, "isDeeplyNestedType_DepthLimit", { typeId: type.id, typeIdStack: stack.map(t => t.id), depth, count });
1829118301
return true;
1829218302
}
1829318303
}

0 commit comments

Comments
 (0)