Skip to content

Commit 1f606bd

Browse files
authored
Merge pull request #16225 from Microsoft/sandersn/weakType
No weak type checks with comparable relation
2 parents 20c11b4 + 2876b3c commit 1f606bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8816,7 +8816,8 @@ namespace ts {
88168816
}
88178817
}
88188818

8819-
if (!(source.flags & TypeFlags.UnionOrIntersection) &&
8819+
if (relation !== comparableRelation &&
8820+
!(source.flags & TypeFlags.UnionOrIntersection) &&
88208821
!(target.flags & TypeFlags.Union) &&
88218822
!isIntersectionConstituent &&
88228823
source !== globalObjectType &&

0 commit comments

Comments
 (0)