@@ -14511,10 +14511,9 @@ namespace ts {
14511
14511
emptyObjectType;
14512
14512
}
14513
14513
14514
- function inferTypes(inferences: InferenceInfo[], originalSource: Type, originalTarget: Type, priority: InferencePriority = 0) {
14514
+ function inferTypes(inferences: InferenceInfo[], originalSource: Type, originalTarget: Type, priority: InferencePriority = 0, contravariant = false ) {
14515
14515
let symbolStack: Symbol[];
14516
14516
let visited: Map<boolean>;
14517
- let contravariant = false;
14518
14517
let bivariant = false;
14519
14518
let propagationType: Type;
14520
14519
let allowComplexConstraintInference = true;
@@ -23474,7 +23473,7 @@ namespace ts {
23474
23473
// contextual signature starting with an empty set of inference candidates.
23475
23474
const inferences = map(context.inferences, info => createInferenceInfo(info.typeParameter));
23476
23475
applyToParameterTypes(instantiatedSignature, contextualSignature, (source, target) => {
23477
- inferTypes(inferences, source, target);
23476
+ inferTypes(inferences, source, target, /*priority*/ 0, /*contravariant*/ true );
23478
23477
});
23479
23478
if (some(inferences, hasInferenceCandidates)) {
23480
23479
// We have inference candidates, indicating that one or more type parameters are referenced
0 commit comments