summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-04-09 09:37:45 +0200
committerAndreas Rumpf <rumpf_a@web.de>2015-04-09 09:37:45 +0200
commit4d0ee66f29cf487cc848a3f4f0f672e2cb0aa3c7 (patch)
treeb88ebb0e5d4d0722f70f62edb1a8a41660e0a865 /compiler
parentfdadc177d49a7384436d5dce773ef9630fda90e7 (diff)
parent1d7fc5fcdaa0e16ac6583709248ba4635129807b (diff)
downloadNim-4d0ee66f29cf487cc848a3f4f0f672e2cb0aa3c7.tar.gz
Merge pull request #2496 from BlaXpirit/js-header-comma
Fix JS codegen: proc header with compiletime arguments
Diffstat (limited to 'compiler')
-rw-r--r--compiler/jsgen.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index 382fe49df..6c667a3a7 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -791,10 +791,10 @@ proc genIf(p: PProc, n: PNode, r: var TCompRes) =
 proc generateHeader(p: PProc, typ: PType): Rope =
   result = nil
   for i in countup(1, sonsLen(typ.n) - 1):
-    if result != nil: add(result, ", ")
     assert(typ.n.sons[i].kind == nkSym)
     var param = typ.n.sons[i].sym
     if isCompileTimeOnly(param.typ): continue
+    if result != nil: add(result, ", ")
     var name = mangleName(param)
     add(result, name)
     if mapType(param.typ) == etyBaseIndex: