summary refs log tree commit diff stats
path: root/compiler/jsgen.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-04-08 20:43:44 +0200
committerAraq <rumpf_a@web.de>2013-04-08 20:43:44 +0200
commit7c12117ce09e2573d9a19a4b4ba96aedd6c3c4b1 (patch)
tree64db663de9f734b2c673768669a94221a3298558 /compiler/jsgen.nim
parent908383e4cab979dcc3ee7a1c1710dd5314984065 (diff)
downloadNim-7c12117ce09e2573d9a19a4b4ba96aedd6c3c4b1.tar.gz
fixes #378
Diffstat (limited to 'compiler/jsgen.nim')
-rw-r--r--compiler/jsgen.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index 13463cf35..f2e317f47 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -1141,6 +1141,8 @@ proc genConstant(p: var TProc, c: PSym, r: var TCompRes) =
   if lfNoDecl notin c.loc.flags and not p.g.generatedSyms.containsOrIncl(c.id):
     genLineDir(p, c.ast, r)
     genVarInit(p, c, c.ast, r)
+    app(p.g.code, r.com)
+    r.com = nil
 
 when false:
   proc genConstStmt(p: var TProc, n: PNode, r: var TCompRes) =