diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2021-09-03 15:18:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-03 15:18:55 +0200 |
commit | 06ff0e96249884f4ac6c49dadc96147be1c31097 (patch) | |
tree | 9f1ec5c915d212bd26787ca376dcf6090ba18c6e /compiler | |
parent | 0635697a89b3aef2a188a0bddb46965bae7ee70f (diff) | |
download | Nim-06ff0e96249884f4ac6c49dadc96147be1c31097.tar.gz |
fixes #18769 (#18790)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semgnrc.nim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/semgnrc.nim b/compiler/semgnrc.nim index 3df1e0c3f..e249d88e8 100644 --- a/compiler/semgnrc.nim +++ b/compiler/semgnrc.nim @@ -107,6 +107,12 @@ proc semGenericStmtSymbol(c: PContext, n: PNode, s: PSym, else: result = n onUse(n.info, s) + of skEnumField: + if overloadableEnums in c.features: + result = symChoice(c, n, s, scOpen) + else: + result = newSymNode(s, n.info) + onUse(n.info, s) else: result = newSymNode(s, n.info) onUse(n.info, s) @@ -407,7 +413,7 @@ proc semGenericStmt(c: PContext, n: PNode, a[^1] = semGenericStmt(c, a[^1], flags, ctx) for j in 0..<a.len-2: addTempDecl(c, getIdentNode(c, a[j]), varKind) - else: + else: illFormedAst(a, c.config) of nkGenericParams: for i in 0..<n.len: |