fixes #798
This commit is contained in:
parent
5d6053173a
commit
7c065bfadf
12 changed files with 10 additions and 2 deletions
|
|
@ -68,7 +68,8 @@ proc hlo(c: PContext, n: PNode): PNode =
|
|||
result = n
|
||||
else:
|
||||
if n.kind in {nkFastAsgn, nkAsgn, nkIdentDefs, nkVarTuple} and
|
||||
n.sons[0].kind == nkSym and sfGlobal in n.sons[0].sym.flags:
|
||||
n.sons[0].kind == nkSym and
|
||||
{sfGlobal, sfPure} * n.sons[0].sym.flags == {sfGlobal, sfPure}:
|
||||
# do not optimize 'var g {.global} = re(...)' again!
|
||||
return n
|
||||
result = applyPatterns(c, n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue