This commit is contained in:
Timothee Cour 2020-03-24 02:14:49 -07:00 • committed by GitHub
commit 46c827be6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -452,7 +452,8 @@ proc semLowerLetVarCustomPragma(c: PContext, a: PNode, n: PNode): PNode =
return nil return nil
let sym = searchInScopes(c, ident) let sym = searchInScopes(c, ident)
if sfCustomPragma in sym.flags: return nil # skip `template myAttr() {.pragma.}` if sym == nil or sfCustomPragma in sym.flags: return nil
# skip if not in scope; skip `template myAttr() {.pragma.}`
let lhs = b[0] let lhs = b[0]
let clash = strTableGet(c.currentScope.symbols, lhs.ident) let clash = strTableGet(c.currentScope.symbols, lhs.ident)
if clash != nil: if clash != nil: