From e4e0667a87b19d06abe187cfec497ccb76af5835 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Wed, 25 Nov 2015 11:10:35 -0800 Subject: [PATCH] Improve variable naming Change `localErrors` to `reportMoreErrors` to more accurately reflect what the variable does. --- src/compiler/checker.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4be22e4499e..b6d00214d4e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5439,21 +5439,21 @@ namespace ts { outer: for (const t of targetSignatures) { if (!t.hasStringLiterals || target.flags & TypeFlags.FromSignature) { - let localErrors = reportErrors; + // Only report errors from the first failure + let reportMoreErrors = reportErrors; const checkedAbstractAssignability = false; for (const s of sourceSignatures) { if (!s.hasStringLiterals || source.flags & TypeFlags.FromSignature) { - const related = signatureRelatedTo(s, t, localErrors); + const related = signatureRelatedTo(s, t, reportMoreErrors); if (related) { result &= related; errorInfo = saveErrorInfo; continue outer; } - // Only report errors from the first failure - localErrors = false; + reportMoreErrors = false; } } - if (localErrors) { + if (reportMoreErrors) { reportError(Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source), signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind));