summary refs log tree commit diff stats
path: root/compiler/liftdestructors.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/liftdestructors.nim')
-rw-r--r--compiler/liftdestructors.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/liftdestructors.nim b/compiler/liftdestructors.nim
index daf91954b..b9b121070 100644
--- a/compiler/liftdestructors.nim
+++ b/compiler/liftdestructors.nim
@@ -656,7 +656,7 @@ proc fillBody(c: var TLiftCtx; t: PType; body, x, y: PNode) =
   of tyTuple:
     fillBodyTup(c, t, body, x, y)
   of tyVarargs, tyOpenArray:
-    if c.kind == attachedDestructor:
+    if c.kind == attachedDestructor and (tfHasAsgn in t.flags or useNoGc(c, t)):
       forallElements(c, t, body, x, y)
     else:
       discard "cannot copy openArray"