fixes #19011 [backport:1.6] (#19114)

This commit is contained in:
Andreas Rumpf
2021-11-09 18:59:59 +01:00
committed by GitHub
parent b7c66ce860
commit 6ff61766da

View File

@@ -1877,7 +1877,7 @@ proc parseEnum(p: var Parser): PNode =
var symPragma = a
var pragma: PNode
if p.tok.tokType == tkCurlyDotLe:
if (p.tok.indent < 0 or p.tok.indent >= p.currInd) and p.tok.tokType == tkCurlyDotLe:
pragma = optPragmas(p)
symPragma = newNodeP(nkPragmaExpr, p)
symPragma.add(a)