Skip to content

Commit cf36faf

Browse files
committed
Computed enum assignability is semi-structural
1 parent 5cf99e6 commit cf36faf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6213,7 +6213,7 @@ namespace ts {
62136213
}
62146214
if (source.symbol.name !== target.symbol.name ||
62156215
!(source.symbol.flags & SymbolFlags.RegularEnum) || !(target.symbol.flags & SymbolFlags.RegularEnum) ||
6216-
!(source.flags & TypeFlags.Union) || !(target.flags & TypeFlags.Union)) {
6216+
(source.flags & TypeFlags.Union) !== (target.flags & TypeFlags.Union)) {
62176217
return (enumRelation[id] = false);
62186218
}
62196219
const targetEnumType = getTypeOfSymbol(target.symbol);

0 commit comments

Comments
 (0)