File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -19292,7 +19292,7 @@ namespace ts {
1929219292 else {
1929319293 // conditionals aren't related to one another via distributive constraint as it is much too inaccurate and allows way
1929419294 // more assignments than are desirable (since it maps the source check type to its constraint, it loses information)
19295- const distributiveConstraint = getConstraintOfDistributiveConditionalType(source as ConditionalType);
19295+ const distributiveConstraint = hasNonCircularBaseConstraint(source) ? getConstraintOfDistributiveConditionalType(source as ConditionalType) : undefined ;
1929619296 if (distributiveConstraint) {
1929719297 if (result = isRelatedTo(distributiveConstraint, target, RecursionFlags.Source, reportErrors)) {
1929819298 resetErrorInfo(saveErrorInfo);
@@ -19920,7 +19920,8 @@ namespace ts {
1992019920 const incompatibleReporter = kind === SignatureKind.Construct ? reportIncompatibleConstructSignatureReturn : reportIncompatibleCallSignatureReturn;
1992119921 const sourceObjectFlags = getObjectFlags(source);
1992219922 const targetObjectFlags = getObjectFlags(target);
19923- if (sourceObjectFlags & ObjectFlags.Instantiated && targetObjectFlags & ObjectFlags.Instantiated && source.symbol === target.symbol) {
19923+ if (sourceObjectFlags & ObjectFlags.Instantiated && targetObjectFlags & ObjectFlags.Instantiated && source.symbol === target.symbol ||
19924+ sourceObjectFlags & ObjectFlags.Reference && targetObjectFlags & ObjectFlags.Reference && (source as TypeReference).target === (target as TypeReference).target) {
1992419925 // We have instantiations of the same anonymous type (which typically will be the type of a
1992519926 // method). Simply do a pairwise comparison of the signatures in the two signature lists instead
1992619927 // of the much more expensive N * M comparison matrix we explore below. We erase type parameters
You can’t perform that action at this time.
0 commit comments