minor codegen bugfix: don't use names for closures that are also mangled Nim names

This commit is contained in:
Araq 2017-02-26 17:40:46 +01:00
commit 46b672a6c4
6 changed files with 17 additions and 17 deletions

View file

@ -628,7 +628,7 @@ proc closureSetup(p: BProc, prc: PSym) =
#echo "created environment: ", env.id, " for ", prc.name.s
assignLocalVar(p, env)
# generate cast assignment:
linefmt(p, cpsStmts, "$1 = ($2) ClEnv;$n",
linefmt(p, cpsStmts, "$1 = ($2) ClE_0;$n",
rdLoc(env.loc), getTypeDesc(p.module, env.typ))
proc easyResultAsgn(n: PNode): PNode =