This commit is contained in:
ringabout
2025-01-24 18:12:38 +08:00
parent b66ff0b6ac
commit 1a16f55948

View File

@@ -2453,14 +2453,14 @@ proc semQuoteAst(c: PContext, n: PNode): PNode =
if c.p.owner != nil and c.p.owner.kind in routineKinds:
# skips the current routine scopes
block exitLabel:
while c.currentScope != nil:
c.currentScope = c.currentScope.parent
while c.currentScope != c.topLevelScope:
block continueLabel:
for s in items(c.currentScope.symbols):
if s.owner != c.p.owner:
break exitLabel
else:
break continueLabel
c.currentScope = c.currentScope.parent
var tmpl = semTemplateDef(c, dummyTemplate)
c.currentScope = oldScope
quotes[0] = tmpl[namePos]