From 36619e3569887c128805c792a556155003fe0146 Mon Sep 17 00:00:00 2001 From: Bung Date: Sat, 25 Jul 2020 15:51:59 +0800 Subject: [PATCH] fix #14534 (#15060) [backport] (cherry picked from commit 9746868832df3ef4b40597fb84f58900b2336496) --- compiler/jsgen.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index 7932929530..d95c2cfbba 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -1632,7 +1632,7 @@ proc createVar(p: PProc, typ: PType, indirect: bool): Rope = of tyObject: var initList: Rope createObjInitList(p, t, initIntSet(), initList) - result = ("{$1}") % [initList] + result = ("({$1})") % [initList] if indirect: result = "[$1]" % [result] of tyVar, tyPtr, tyLent, tyRef, tyPointer: if mapType(p, t) == etyBaseIndex: