Skip to content

Commit f0ed311

Browse files
committed
Higher order this parameter inference, like microsoft#31116
1 parent ba5e86f commit f0ed311

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23623,7 +23623,7 @@ namespace ts {
2362323623
const thisType = getThisTypeOfSignature(signature);
2362423624
if (thisType) {
2362523625
const thisArgumentNode = getThisArgumentOfCall(node);
23626-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
23626+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2362723627
inferTypes(context.inferences, thisArgumentType, thisType);
2362823628
}
2362923629

0 commit comments

Comments
 (0)