fix #14534 (#15060) [backport]

(cherry picked from commit 9746868832)
This commit is contained in:
Bung
2020-07-25 15:51:59 +08:00
committed by narimiran
parent f4ae3ab729
commit 36619e3569

View File

@@ -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: