a better bugfix
This commit is contained in:
parent
767bd57289
commit
6152eb3be3
2 changed files with 36 additions and 33 deletions
|
|
@ -362,13 +362,13 @@ proc genObjectInit(p: BProc, section: TCProcSection, t: PType, a: var TLoc,
|
|||
linefmt(p, section, "$1.m_type = $2;$n", [r, genTypeInfo(p.module, t, a.lode.info)])
|
||||
of frEmbedded:
|
||||
if optTinyRtti in p.config.globalOptions:
|
||||
var n = newNodeIT(nkObjConstr, a.lode.info, t)
|
||||
n.add newNodeIT(nkType, a.lode.info, t)
|
||||
if mode == constructRefObj:
|
||||
var n = newNodeIT(nkObjConstr, a.lode.info, t)
|
||||
n.add newNodeIT(nkType, a.lode.info, t)
|
||||
genObjConstr(p, n, a)
|
||||
else:
|
||||
var tmp: TLoc
|
||||
rawConstExpr(p, n, tmp)
|
||||
rawConstExpr(p, newNodeIT(nkType, a.lode.info, t), tmp)
|
||||
genAssignment(p, a, tmp, {})
|
||||
else:
|
||||
# worst case for performance:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue