make destructors more robust against unchecked arrays
This commit is contained in:
parent
f6c63d1191
commit
9911d375b3
1 changed files with 1 additions and 1 deletions
|
|
@ -203,7 +203,7 @@ proc liftBodyAux(c: var TLiftCtx; t: PType; body, x, y: PNode) =
|
||||||
tyPtr, tyString, tyRef, tyOpt:
|
tyPtr, tyString, tyRef, tyOpt:
|
||||||
defaultOp(c, t, body, x, y)
|
defaultOp(c, t, body, x, y)
|
||||||
of tyArray, tySequence:
|
of tyArray, tySequence:
|
||||||
if tfHasAsgn in t.flags:
|
if {tfHasAsgn, tfUncheckedArray} * t.flags == {tfHasAsgn}:
|
||||||
if t.kind == tySequence:
|
if t.kind == tySequence:
|
||||||
# XXX add 'nil' handling here
|
# XXX add 'nil' handling here
|
||||||
body.add newSeqCall(c.c, x, y)
|
body.add newSeqCall(c.c, x, y)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue