From a8090f7d650a5d7ef51416c9fe2708be0de50e95 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 6 Dec 2022 05:24:36 +0800 Subject: [PATCH] fixes `isLocalVarSym`; an implicit global is a global nonetheless (#21025) fixes isLocalVarSym; an implicit global is a global nonetheless --- compiler/semstmts.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index f1875a3d83..4b179c2f07 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -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