fixes isLocalVarSym; an implicit global is a global nonetheless (#21025)

fixes isLocalVarSym; an implicit global is a global nonetheless
This commit is contained in:
ringabout
2022-12-06 05:24:36 +08:00
committed by GitHub
parent 794bcc8029
commit a8090f7d65

View File

@@ -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