summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-04-27 09:36:34 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-04-27 09:36:34 +0200
commit46ce79723123d3706b124f736cecf6bd5d2bac06 (patch)
treecf7e512feadbd94b279754dbf8eb10f7ea220ce3 /compiler
parent8e27bddb97cb5629c35807c81ead3da58a09ebcc (diff)
downloadNim-46ce79723123d3706b124f736cecf6bd5d2bac06.tar.gz
newruntime: progress...
Diffstat (limited to 'compiler')
-rw-r--r--compiler/injectdestructors.nim8
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/injectdestructors.nim b/compiler/injectdestructors.nim
index 197d15490..3fbcf008b 100644
--- a/compiler/injectdestructors.nim
+++ b/compiler/injectdestructors.nim
@@ -732,11 +732,9 @@ proc p(n: PNode; c: var Con): PNode =
             # make sure it's destroyed at the end of the proc:
             if not isUnpackedTuple(it[0].sym):
               c.destroys.add genDestroy(c, v.typ, v)
-            if ri.kind != nkEmpty:
-              let r = moveOrCopy(v, ri, c)
-              result.add r
-          else:
-            result.add keepVar(n, it, c)
+          if ri.kind != nkEmpty:
+            let r = moveOrCopy(v, ri, c)
+            result.add r
       else:
         result.add keepVar(n, it, c)
   of nkCallKinds: