From 3fbbea9cee43c9a10c2c84e4d0b45908cdd020c1 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Fri, 20 Mar 2026 13:47:28 +0800 Subject: [PATCH] progress --- compiler/ast2nif.nim | 3 ++- compiler/semstmts.nim | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/ast2nif.nim b/compiler/ast2nif.nim index 1382625cf5..8847af32b7 100644 --- a/compiler/ast2nif.nim +++ b/compiler/ast2nif.nim @@ -167,7 +167,8 @@ const proc isLocalSym(sym: PSym): bool {.inline.} = sym.kindImpl in skLocalSymKinds or - (sym.kindImpl in {skVar, skLet} and {sfGlobal, sfThread} * sym.flagsImpl == {}) + (sym.kindImpl in {skVar, skLet} and {sfGlobal, sfThread} * sym.flagsImpl == {} and + (sym.ownerFieldImpl == nil or sym.ownerFieldImpl.kindImpl != skModule)) proc toNifSymName(w: var Writer; sym: PSym): string = ## Generate NIF name for a symbol: local names are `ident.disamb`, diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 9812f90d06..7e07143837 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -781,8 +781,6 @@ proc makeVarTupleSection(c: PContext, n, a, def: PNode, typ: PType, symkind: TSy let temp = newSym(symkind, getIdent(c.cache, "tmpTuple"), c.idgen, getCurrOwner(c), n.info) temp.typ = typ temp.flagsImpl.incl(sfGenSym) - if getCurrOwner(c).kind == skModule: - temp.flagsImpl.incl(sfGlobal) lastDef = newNodeI(defkind, a.info) newSons(lastDef, 3) lastDef[0] = newSymNode(temp)