diff options
author | Araq <rumpf_a@web.de> | 2016-12-01 09:01:00 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2016-12-01 09:01:00 +0100 |
commit | 2adb2be86a5302e532d8463243cbdd57beaa0d4f (patch) | |
tree | 070d64c651be77cedbfc120c70a78f413c0049b2 | |
parent | 2a7b4fda78758005a9c67a0e5f83b7594d616b2a (diff) | |
download | Nim-2adb2be86a5302e532d8463243cbdd57beaa0d4f.tar.gz |
fixes tconsttable regression
-rw-r--r-- | compiler/ccgexprs.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index b3ad6bbc3..18b0e5e20 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -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])]) |