* fixes #13744 * improve style Co-authored-by: cooldome <ariabushenko@gmail.ru>
This commit is contained in:
parent
46c827be6a
commit
182d3c16e3
4 changed files with 44 additions and 1 deletions
|
|
@ -1941,6 +1941,8 @@ proc genSomeCast(p: BProc, e: PNode, d: var TLoc) =
|
|||
elif optSeqDestructors in p.config.globalOptions and etyp.kind in {tySequence, tyString}:
|
||||
putIntoDest(p, d, e, "(*($1*) (&$2))" %
|
||||
[getTypeDesc(p.module, e.typ), rdCharLoc(a)], a.storage)
|
||||
elif etyp.kind == tyBool and srcTyp.kind in IntegralTypes:
|
||||
putIntoDest(p, d, e, "(($1) != 0)" % [rdCharLoc(a)], a.storage)
|
||||
else:
|
||||
putIntoDest(p, d, e, "(($1) ($2))" %
|
||||
[getTypeDesc(p.module, e.typ), rdCharLoc(a)], a.storage)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue