.pure enums are much more convenient to use now
This commit is contained in:
parent
ae7fe5087f
commit
fd4ef6ae8f
6 changed files with 27 additions and 7 deletions
|
|
@ -105,6 +105,10 @@ proc lookup(c: PContext, n: PNode, flags: TSemGenericFlags,
|
|||
result = n
|
||||
let ident = considerQuotedIdent(n)
|
||||
var s = searchInScopes(c, ident).skipAlias(n)
|
||||
if s == nil:
|
||||
s = strTableGet(c.pureEnumFields, ident)
|
||||
if s != nil and contains(c.ambiguousSymbols, s.id):
|
||||
s = nil
|
||||
if s == nil:
|
||||
if ident.id notin ctx.toMixin and withinMixin notin flags:
|
||||
errorUndeclaredIdentifier(c, n.info, ident.s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue