diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ace3d5ee8cfe2..90ed5cba7782f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -23623,7 +23623,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); }