From 327dea7359db06d48bfa9137afeeb3a55280a887 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 0d7448ab650ab..acbb1e7f01185 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -24257,7 +24257,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); }