Add resetErrorInfo (though, oddly, shouldn't be necessary)

This commit is contained in:
Anders Hejlsberg
2022-02-04 12:16:43 -08:00
parent a009ee1116
commit a65794c84d

View File

@@ -18375,7 +18375,9 @@ namespace ts {
}
}
else if (source.flags & TypeFlags.StructuredOrInstantiable || target.flags & TypeFlags.StructuredOrInstantiable) {
result = recursiveTypeRelatedTo(source, target, reportErrors, intersectionState, recursionFlags);
if (result = recursiveTypeRelatedTo(source, target, reportErrors, intersectionState, recursionFlags)) {
resetErrorInfo(saveErrorInfo);
}
}
if (!result && source.flags & (TypeFlags.Intersection | TypeFlags.TypeParameter)) {
// The combined constraint of an intersection type is the intersection of the constraints of