overloadable enums no longer experimental (#20298)

depends on #20126
This commit is contained in:
metagn 2022-09-06 00:38:38 +03:00 • committed by GitHub
commit 5ebd1248df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 27 additions and 41 deletions

View file

@ -143,10 +143,7 @@ proc semEnum(c: PContext, n: PNode, prev: PType): PType =
onDef(e.info, e)
if sfGenSym notin e.flags:
if not isPure:
if overloadableEnums in c.features:
addInterfaceOverloadableSymAt(c, c.currentScope, e)
else:
addInterfaceDecl(c, e)
addInterfaceOverloadableSymAt(c, c.currentScope, e)
else:
declarePureEnumField(c, e)
if isPure and (let conflict = strTableInclReportConflict(symbols, e); conflict != nil):