From 9746868832df3ef4b40597fb84f58900b2336496 Mon Sep 17 00:00:00 2001 From: Bung Date: Sat, 25 Jul 2020 15:51:59 +0800 Subject: [PATCH] fix #14534 (#15060) [backport] --- compiler/jsgen.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index d876531e9..3351d64ae 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -1689,7 +1689,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: