summary refs log tree commit diff stats
path: root/compiler/jsgen.nim
diff options
context:
space:
mode:
authorYuriy Glukhov <yglukhov@users.noreply.github.com>2017-01-23 21:09:43 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-01-23 20:09:43 +0100
commit268c899b98c5625efc438619805404953ee8e547 (patch)
tree4d06737fce7b339fe3ccf7803244ff30566a7025 /compiler/jsgen.nim
parente17969c03f38874c57140b7162aa74318fa1cb2c (diff)
downloadNim-268c899b98c5625efc438619805404953ee8e547.tar.gz
Fixup #5240 (#5270)
Diffstat (limited to 'compiler/jsgen.nim')
-rw-r--r--compiler/jsgen.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index 420022b05..b60c8f3ca 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -1374,7 +1374,7 @@ proc createRecordVarAux(p: PProc, rec: PNode, excludedFieldIDs: IntSet, output:
     if rec.sym.id notin excludedFieldIDs:
       if output.len > 0: output.add(", ")
       if p.target == targetJS:
-        output.addf("'$#': ", [mangleName(rec.sym, p.target)])
+        output.addf("$#: ", [mangleName(rec.sym, p.target)])
       else:
         output.addf("'$#' => ", [mangleName(rec.sym, p.target)])
       output.add(createVar(p, rec.sym.typ, false))
@@ -1883,7 +1883,7 @@ proc genObjConstr(p: PProc, n: PNode, r: var TCompRes) =
     var f = it.sons[0].sym
     if f.loc.r == nil: f.loc.r = mangleName(f, p.target)
     fieldIDs.incl(f.id)
-    addf(initList, "'$#': $#" | "'$#' => $#" , [f.loc.r, a.res])
+    addf(initList, "$#: $#" | "'$#' => $#" , [f.loc.r, a.res])
   let t = skipTypes(n.typ, abstractInst + skipPtrs)
   createObjInitList(p, t, fieldIDs, initList)
   r.res = ("{$1}" | "array($#)") % [initList]