fixes yet another codegen problem with constant closures

This commit is contained in:
Andreas Rumpf
2016-01-15 01:50:52 +01:00
parent 35b65e6f4e
commit 02a0782389

View File

@@ -1840,7 +1840,7 @@ proc genClosure(p: BProc, n: PNode, d: var TLoc) =
if isConstClosure(n):
inc(p.module.labels)
var tmp = "LOC" & rope(p.module.labels)
addf(p.module.s[cfsData], "NIM_CONST $1 $2 = $3;$n",
addf(p.module.s[cfsData], "static NIM_CONST $1 $2 = $3;$n",
[getTypeDesc(p.module, n.typ), tmp, genConstExpr(p, n)])
putIntoDest(p, d, n.typ, tmp, OnStatic)
else: