Skip to content

Commit 00804d8

Browse files
committed
Trace structuredTypeRelatedTo, rather than recursiveTypeRelatedTo
1 parent a0479da commit 00804d8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/compiler/checker.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -16818,13 +16818,6 @@ namespace ts {
1681816818
// equal and infinitely expanding. Fourth, if we have reached a depth of 100 nested comparisons, assume we have runaway recursion
1681916819
// and issue an error. Otherwise, actually compare the structure of the two types.
1682016820
function recursiveTypeRelatedTo(source: Type, target: Type, reportErrors: boolean, intersectionState: IntersectionState): Ternary {
16821-
tracing.begin(tracing.Phase.Check, "recursiveTypeRelatedTo", { sourceId: source.id, targetId: target.id });
16822-
const result = recursiveTypeRelatedToWorker(source, target, reportErrors, intersectionState);
16823-
tracing.end();
16824-
return result;
16825-
}
16826-
16827-
function recursiveTypeRelatedToWorker(source: Type, target: Type, reportErrors: boolean, intersectionState: IntersectionState): Ternary {
1682816821
if (overflow) {
1682916822
return Ternary.False;
1683016823
}
@@ -16909,6 +16902,13 @@ namespace ts {
1690916902
}
1691016903

1691116904
function structuredTypeRelatedTo(source: Type, target: Type, reportErrors: boolean, intersectionState: IntersectionState): Ternary {
16905+
tracing.begin(tracing.Phase.Check, "structuredTypeRelatedTo", { sourceId: source.id, targetId: target.id });
16906+
const result = structuredTypeRelatedToWorker(source, target, reportErrors, intersectionState);
16907+
tracing.end();
16908+
return result;
16909+
}
16910+
16911+
function structuredTypeRelatedToWorker(source: Type, target: Type, reportErrors: boolean, intersectionState: IntersectionState): Ternary {
1691216912
if (intersectionState & IntersectionState.PropertyCheck) {
1691316913
return propertiesRelatedTo(source, target, reportErrors, /*excludedProperties*/ undefined, IntersectionState.None);
1691416914
}

0 commit comments

Comments
 (0)