Skip to content

Commit 267042f

Browse files
committed
Computed enum assignability is semi-structural
1 parent bfed544 commit 267042f

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
@@ -6202,7 +6202,7 @@ namespace ts {
62026202
}
62036203
if (source.symbol.name !== target.symbol.name ||
62046204
!(source.symbol.flags & SymbolFlags.RegularEnum) || !(target.symbol.flags & SymbolFlags.RegularEnum) ||
6205-
!(source.flags & TypeFlags.Union) || !(target.flags & TypeFlags.Union)) {
6205+
(source.flags & TypeFlags.Union) !== (target.flags & TypeFlags.Union)) {
62066206
return (enumRelation[id] = false);
62076207
}
62086208
const targetEnumType = getTypeOfSymbol(target.symbol);

0 commit comments

Comments
 (0)