File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -11891,7 +11891,8 @@ namespace ts {
11891
11891
// for the argument. In that case, we should check the argument.
11892
11892
if (argType === undefined) {
11893
11893
// If the parameter and argument are both functions and the parameter has fewer arguments than the argument,
11894
- // then this signature is not applicable. Exit early.
11894
+ // then this signature is not applicable. Exit early to avoid fixing incorrect
11895
+ // contextual types to the function expression parameters.
11895
11896
if (!reportErrors && isAritySmaller(paramType, arg)) {
11896
11897
return false;
11897
11898
}
@@ -11922,6 +11923,8 @@ namespace ts {
11922
11923
const sourceLengths = sourceSignatures.map(sig => !sig.hasRestParameter ? sig.parameters.length : Number.MAX_VALUE);
11923
11924
return forEach(sourceLengths, len => len < targetParameterCount);
11924
11925
}
11926
+
11927
+ return false;
11925
11928
}
11926
11929
11927
11930
/**
You can’t perform that action at this time.
0 commit comments