summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-10-18 17:05:33 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-10-19 13:29:11 +0200
commit9911d375b3877b8feb92cee680be34f73451d145 (patch)
tree0c52dddfcccc17e86e5597c7abdaa6bef780bdde
parentf6c63d1191d445487430fc69ac346bba96bf572d (diff)
downloadNim-9911d375b3877b8feb92cee680be34f73451d145.tar.gz
make destructors more robust against unchecked arrays
-rw-r--r--compiler/semasgn.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semasgn.nim b/compiler/semasgn.nim
index cb4728097..835da55ac 100644
--- a/compiler/semasgn.nim
+++ b/compiler/semasgn.nim
@@ -203,7 +203,7 @@ proc liftBodyAux(c: var TLiftCtx; t: PType; body, x, y: PNode) =
       tyPtr, tyString, tyRef, tyOpt:
     defaultOp(c, t, body, x, y)
   of tyArray, tySequence:
-    if tfHasAsgn in t.flags:
+    if {tfHasAsgn, tfUncheckedArray} * t.flags == {tfHasAsgn}:
       if t.kind == tySequence:
         # XXX add 'nil' handling here
         body.add newSeqCall(c.c, x, y)