This commit is contained in:
Andreas Rumpf 2021-09-03 15:18:55 +02:00 • committed by GitHub
commit 06ff0e9624
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 2 deletions

View file

@ -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: