diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-04-27 09:36:34 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-04-27 09:36:34 +0200 |
commit | 46ce79723123d3706b124f736cecf6bd5d2bac06 (patch) | |
tree | cf7e512feadbd94b279754dbf8eb10f7ea220ce3 /compiler | |
parent | 8e27bddb97cb5629c35807c81ead3da58a09ebcc (diff) | |
download | Nim-46ce79723123d3706b124f736cecf6bd5d2bac06.tar.gz |
newruntime: progress...
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/injectdestructors.nim | 8 |
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: |