From 2885e846e54826fc5fed495095de7da70c07a0de Mon Sep 17 00:00:00 2001 From: Jack Bates Date: Wed, 28 Aug 2019 16:18:51 -0700 Subject: [PATCH] Higher order this parameter inference, like #31116 --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b718c72c009b9..e3f0d983ebe90 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -23658,7 +23658,7 @@ namespace ts { const thisType = getThisTypeOfSignature(signature); if (thisType) { const thisArgumentNode = getThisArgumentOfCall(node); - const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType; + const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType; inferTypes(context.inferences, thisArgumentType, thisType); }