diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ad3f3b71f29fb..f03439dcff53c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -24179,7 +24179,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); }