From e905ffa0e4258806793667204bccb0605d598640 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 85c6b695063d7..0d96cb326a128 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -23725,7 +23725,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); }