From f17174ceb0c49c079d2ca77d78ca360b5c7158b4 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Mon, 30 Mar 2020 15:12:16 -0700 Subject: [PATCH] Fix build after merging #35862 --- src/compiler/checker.ts | 2 +- .../reference/truthinessCallExpressionCoercion.types | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d12687bdb5b..c93bc9e56a6 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -31622,7 +31622,7 @@ namespace ts { const childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol === testedFunctionSymbol) { // If the test was a simple identifier, the above check is sufficient - if (isIdentifier(ifStatement.expression)) { + if (isIdentifier(condExpr)) { return true; } // Otherwise we need to ensure the symbol is called on the same target diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion.types b/tests/baselines/reference/truthinessCallExpressionCoercion.types index 6b934f44f22..21c2328455c 100644 --- a/tests/baselines/reference/truthinessCallExpressionCoercion.types +++ b/tests/baselines/reference/truthinessCallExpressionCoercion.types @@ -189,9 +189,9 @@ function A(stats: StatsBase) { console.log(`[Directory] ${stats.ctime}`) >console.log(`[Directory] ${stats.ctime}`) : void ->console.log : (message?: any, ...optionalParams: any[]) => void +>console.log : (...data: any[]) => void >console : Console ->log : (message?: any, ...optionalParams: any[]) => void +>log : (...data: any[]) => void >`[Directory] ${stats.ctime}` : string >stats.ctime : number >stats : StatsBase