Skip to content

Commit

Permalink
Add resetErrorInfo (though, oddly, shouldn't be necessary)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg committed Feb 4, 2022
1 parent a009ee1 commit a65794c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a65794c

Please sign in to comment.