Skip to content

Commit ba0c8f3

Browse files
committed
Higher order this parameter inference, like microsoft#31116
1 parent 6f079a4 commit ba0c8f3

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
@@ -24251,7 +24251,7 @@ namespace ts {
2425124251
const thisType = getThisTypeOfSignature(signature);
2425224252
if (thisType) {
2425324253
const thisArgumentNode = getThisArgumentOfCall(node);
24254-
const thisArgumentType = thisArgumentNode ? checkExpression(thisArgumentNode) : voidType;
24254+
const thisArgumentType = thisArgumentNode ? checkExpressionWithContextualType(thisArgumentNode, thisType, context, checkMode) : voidType;
2425524255
inferTypes(context.inferences, thisArgumentType, thisType);
2425624256
}
2425724257

0 commit comments

Comments
 (0)