summary refs log tree commit diff stats
path: root/compiler/ccgexprs.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-01-15 01:50:52 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-01-15 01:50:52 +0100
commit02a0782389ba2c7a55b9911d927b00b98b2120a4 (patch)
tree4d708dc589e922a64b5f3c805c6f004206bedd50 /compiler/ccgexprs.nim
parent35b65e6f4ed9ff0c6eb327de6c49c9ed32d3592c (diff)
downloadNim-02a0782389ba2c7a55b9911d927b00b98b2120a4.tar.gz
fixes yet another codegen problem with constant closures
Diffstat (limited to 'compiler/ccgexprs.nim')
-rw-r--r--compiler/ccgexprs.nim2
1 files changed, 1 insertions, 1 deletions
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: