Skip to content

Commit 5c13401

Browse files
Only check isUnitType when dealing with non-unions.
1 parent 44ce3cf commit 5c13401

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18901,7 +18901,7 @@ namespace ts {
1890118901
}
1890218902
}
1890318903

18904-
const isPerformingCommonPropertyChecks = (relation !== comparableRelation || relation === comparableRelation && isLiteralType(source)) &&
18904+
const isPerformingCommonPropertyChecks = (relation !== comparableRelation || !(source.flags & TypeFlags.Union) && isLiteralType(source)) &&
1890518905
!(intersectionState & IntersectionState.Target) &&
1890618906
source.flags & (TypeFlags.Primitive | TypeFlags.Object | TypeFlags.Intersection) && source !== globalObjectType &&
1890718907
target.flags & (TypeFlags.Object | TypeFlags.Intersection) && isWeakType(target) &&

0 commit comments

Comments
 (0)