This commit is contained in:
ringabout
2026-03-20 13:47:28 +08:00
parent ab2256faee
commit 3fbbea9cee
2 changed files with 2 additions and 3 deletions

View File

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

View File

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