File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -14617,9 +14617,11 @@ namespace ts {
14617
14617
const candidate = propagationType || source;
14618
14618
// We make contravariant inferences only if we are in a pure contravariant position,
14619
14619
// i.e. only if we have not descended into a bivariant position.
14620
- if (contravariant && !bivariant && !contains(inference.contraCandidates, candidate)) {
14621
- inference.contraCandidates = append(inference.contraCandidates, candidate);
14622
- inference.inferredType = undefined;
14620
+ if (contravariant && !bivariant) {
14621
+ if (!contains(inference.contraCandidates, candidate)) {
14622
+ inference.contraCandidates = append(inference.contraCandidates, candidate);
14623
+ inference.inferredType = undefined;
14624
+ }
14623
14625
}
14624
14626
else if (!contains(inference.candidates, candidate)) {
14625
14627
inference.candidates = append(inference.candidates, candidate);
You can’t perform that action at this time.
0 commit comments