@@ -10879,34 +10879,36 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
10879
10879
for (let i = 0; i < passCount; i++) {
10880
10880
useSpeculativeMode(errorNode, () => {
10881
10881
matchResults.argParams.forEach((argParam) => {
10882
- if (argParam.requiresTypeVarMatching) {
10883
- // Populate the typeVarContext for the argument. If the argument
10884
- // is an overload function, skip it during the first pass
10885
- // because the selection of the proper overload may depend
10886
- // on type arguments supplied by other function arguments.
10887
- // Set useNarrowBoundOnly to true the first time through
10888
- // the loop if we're going to go through the loop multiple
10889
- // times.
10890
- const argResult = validateArgType(
10891
- argParam,
10892
- typeVarContext,
10893
- { type, isIncomplete: matchResults.isTypeIncomplete },
10894
- skipUnknownAr
8000
gCheck,
10895
- /* skipOverloadArg */ i === 0,
10896
- /* useNarrowBoundOnly */ passCount > 1 && i === 0,
10897
- typeCondition
10898
- );
10882
+ if (!argParam.requiresTypeVarMatching) {
10883
+ return;
10884
+ }
10899
10885
10900
- if (argResult.isTypeIncomplete) {
10901
- isTypeIncomplete = true;
10902
- }
10886
+ // Populate the typeVarContext for the argument. If the argument
10887
+ // is an overload function, skip it during the first pass
10888
+ // because the selection of the proper overload may depend
10889
+ // on type arguments supplied by other function arguments.
10890
+ // Set useNarrowBoundOnly to true the first time through
10891
+ // the loop if we're going to go through the loop multiple
10892
+ // times.
10893
+ const argResult = validateArgType(
10894
+ argParam,
10895
+ typeVarContext,
10896
+ { type, isIncomplete: matchResults.isTypeIncomplete },
10897
+ skipUnknownArgCheck,
10898
+ /* skipOverloadArg */ i === 0,
10899
+ /* useNarrowBoundOnly */ passCount > 1 && i === 0,
10900
+ typeCondition
10901
+ );
10903
10902
10904
- // If we skipped a overload arg during the first pass,
10905
- // add another pass to ensure that we handle all of the
10906
- // type variables.
10907
- if (i === 0 && argResult.skippedOverloadArg) {
10908
- passCount++;
10909
- }
10903
+ if (argResult.isTypeIncomplete) {
10904
+ isTypeIncomplete = true;
10905
+ }
10906
+
10907
+ // If we skipped a overload arg during the first pass,
10908
+ // add another pass to ensure that we handle all of the
10909
+ // type variables.
10910
+ if (i === 0 && argResult.skippedOverloadArg) {
10911
+ passCount++;
10910
10912
}
10911
10913
});
10
8B2D
912
10914
});
0 commit comments