From 268c899b98c5625efc438619805404953ee8e547 Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Mon, 23 Jan 2017 21:09:43 +0200 Subject: [PATCH] Fixup #5240 (#5270) --- compiler/jsgen.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index 420022b056..b60c8f3cad 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]