Skip to content

Commit 144a635

Browse files
committed
Changing comment per CR feedback
1 parent 30d15a8 commit 144a635

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4486,9 +4486,9 @@ namespace ts {
44864486
}
44874487
}
44884488
else {
4489-
// A check of the form A | B = C & D can be satisfied either by having C be related to A | B,
4490-
// D be related to A | B, C & D be related to A, or C & D be related to B. Thus, we need to
4491-
// check both sides here.
4489+
// It is necessary to try "each" checks on both sides because there may be nested "some" checks
4490+
// on either side that need to be prioritized. For example, A | B = (A | B) & (C | D) or
4491+
// A & B = (A & B) | (C & D).
44924492
if (source.flags & TypeFlags.Intersection) {
44934493
// If target is a union type the following check will report errors so we suppress them here
44944494
if (result = someTypeRelatedToType(<IntersectionType>source, target, reportErrors && !(target.flags & TypeFlags.Union))) {

0 commit comments

Comments
 (0)