No excessive stack depth global errors (#37873)

* Report excessive stack depth on current node when no error node available

* Accept new baselines
This commit is contained in:
Anders Hejlsberg 2020-04-09 19:05:35 -07:00 committed by GitHub
parent bc8a98ff00
commit 6b1c102bd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -15253,7 +15253,7 @@ namespace ts {
reportIncompatibleStack();
}
if (overflow) {
const diag = error(errorNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target));
const diag = error(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target));
if (errorOutputContainer) {
(errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag);
}

File diff suppressed because one or more lines are too long