This commit is contained in:
Timothee Cour
2020-03-24 02:14:49 -07:00
committed by GitHub
parent 5300baae06
commit 46c827be6a

View File

@@ -452,7 +452,8 @@ proc semLowerLetVarCustomPragma(c: PContext, a: PNode, n: PNode): PNode =
return nil
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 clash = strTableGet(c.currentScope.symbols, lhs.ident)
if clash != nil: