Skip to content

Commit

Permalink
fix #13737 (#13738)
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Mar 24, 2020
1 parent 5300baa commit 46c827b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/semstmts.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 46c827b

Please sign in to comment.