Skip to content

Commit 6b1c102

Browse files
authored
No excessive stack depth global errors (#37873)
* Report excessive stack depth on current node when no error node available * Accept new baselines
1 parent bc8a98f commit 6b1c102

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15253,7 +15253,7 @@ namespace ts {
1525315253
reportIncompatibleStack();
1525415254
}
1525515255
if (overflow) {
15256-
const diag = error(errorNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target));
15256+
const diag = error(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target));
1525715257
if (errorOutputContainer) {
1525815258
(errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag);
1525915259
}

0 commit comments

Comments
 (0)