From 02a0782389ba2c7a55b9911d927b00b98b2120a4 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 15 Jan 2016 01:50:52 +0100 Subject: [PATCH] fixes yet another codegen problem with constant closures --- compiler/ccgexprs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index 73120bc93..ff1501cc2 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -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: