Skip to content

Commit

Permalink
fixes isLocalVarSym; an implicit global is a global nonetheless (ni…
Browse files Browse the repository at this point in the history
…m-lang#21025)

fixes isLocalVarSym; an implicit global is a global nonetheless
  • Loading branch information
ringabout authored and bung87 committed Jul 29, 2023
1 parent 061812c commit 073987d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/semstmts.nim
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ proc semVarMacroPragma(c: PContext, a: PNode, n: PNode): PNode =

template isLocalVarSym(n: PNode): bool =
n.kind == nkSym and
(n.sym.kind in {skVar, skLet} and not
({sfGlobal, sfPure} <= n.sym.flags or
(n.sym.kind in {skVar, skLet} and not
({sfGlobal, sfPure} * n.sym.flags != {} or
sfCompileTime in n.sym.flags) or
n.sym.kind in {skProc, skFunc, skIterator} and
sfGlobal notin n.sym.flags
Expand Down

0 comments on commit 073987d

Please sign in to comment.