File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -4372,8 +4372,11 @@ module ts {
4372
4372
}
4373
4373
4374
4374
function reportNoCommonSupertypeError(types: Type[], errorLocation: Node, errorMessageChainHead: DiagnosticMessageChain): void {
4375
+ // The downfallType/bestSupertypeDownfallType is the first type that caused a particular candidate
4376
+ // to not be the common supertype. So if it weren't for this one downfallType (and possibly others),
4377
+ // the type in question could have been the common supertype.
4375
4378
let bestSupertype: Type;
4376
- let bestSupertypeDownfallType: Type; // The type that caused bestSupertype not to be the common supertype
4379
+ let bestSupertypeDownfallType: Type;
4377
4380
let bestSupertypeScore = 0;
4378
4381
4379
4382
for (let i = 0; i < types.length; i++) {
@@ -4575,9 +4578,9 @@ module ts {
4575
4578
inferences.push({ primary: undefined, secondary: undefined, isFixed: false });
4576
4579
}
4577
4580
return {
4578
- typeParameters: typeParameters ,
4579
- inferUnionTypes: inferUnionTypes ,
4580
- inferences: inferences ,
4581
+ typeParameters,
4582
+ inferUnionTypes,
4583
+ inferences,
4581
4584
inferredTypes: new Array(typeParameters.length),
4582
4585
};
4583
4586
}
You can’t perform that action at this time.
0 commit comments