Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5018297

Browse files
committedDec 31, 2019
remove unwanted changes
1 parent 5f0c69e commit 5018297

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed
 

Diff for: ‎compiler/injectdestructors.nim

+2-5
Original file line numberDiff line numberDiff line change
@@ -612,11 +612,8 @@ proc p(n: PNode; c: var Con; mode: ProcessMode): PNode =
612612
proc moveOrCopy(dest, ri: PNode; c: var Con): PNode =
613613
case ri.kind
614614
of nkCallKinds:
615-
if isUnpackedTuple(dest):
616-
result = newTree(nkFastAsgn, dest, p(ri, c, consumed))
617-
else:
618-
result = genSink(c, dest, ri)
619-
result.add p(ri, c, consumed)
615+
result = genSink(c, dest, ri)
616+
result.add p(ri, c, consumed)
620617
of nkBracketExpr:
621618
if isUnpackedTuple(ri[0]):
622619
# unpacking of tuple: take over elements

Diff for: ‎tests/destructor/t12037.nim

+1
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ proc bug(start: (seq[int], int)) =
3232

3333
let input = @[0]
3434
bug((input, 0))
35+
doASsert(input.len == 1)

0 commit comments

Comments
 (0)
Please sign in to comment.