fixes tconsttable regression
This commit is contained in:
parent
2a7b4fda78
commit
2adb2be86a
1 changed files with 3 additions and 2 deletions
|
|
@ -2152,9 +2152,10 @@ proc genNamedConstExpr(p: BProc, n: PNode): Rope =
|
|||
proc genConstSimpleList(p: BProc, n: PNode): Rope =
|
||||
var length = sonsLen(n)
|
||||
result = rope("{")
|
||||
if n.kind == nkObjConstr and not isObjLackingTypeField(n.typ) and
|
||||
let t = n.typ.skipTypes(abstractInst)
|
||||
if n.kind == nkObjConstr and not isObjLackingTypeField(t) and
|
||||
not p.module.compileToCpp:
|
||||
addf(result, "{$1}", [genTypeInfo(p.module, n.typ)])
|
||||
addf(result, "{$1}", [genTypeInfo(p.module, t)])
|
||||
if n.len > 1: add(result, ",")
|
||||
for i in countup(ord(n.kind == nkObjConstr), length - 2):
|
||||
addf(result, "$1,$n", [genNamedConstExpr(p, n.sons[i])])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue