From 015bec625461826c3891110182b982c5dbb3208a Mon Sep 17 00:00:00 2001 From: narimiran Date: Sun, 24 Nov 2019 09:50:52 +0100 Subject: [PATCH] Revert "ARC: another critical bugfix; temporary tuples we introduce for tuple unpackaging are not owning the data" This reverts commit 8b2f8f5430e8c328efe5bce94e397f15e3c501af. --- compiler/lowerings.nim | 1 - tests/destructor/tmisc_destructors.nim | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/lowerings.nim b/compiler/lowerings.nim index 96afc48286..0922ab088a 100644 --- a/compiler/lowerings.nim +++ b/compiler/lowerings.nim @@ -60,7 +60,6 @@ proc lowerTupleUnpacking*(g: ModuleGraph; n: PNode; owner: PSym): PNode = var temp = newSym(skTemp, getIdent(g.cache, genPrefix), owner, value.info, g.config.options) temp.typ = skipTypes(value.typ, abstractInst) incl(temp.flags, sfFromGeneric) - incl(temp.flags, sfCursor) var v = newNodeI(nkVarSection, value.info) let tempAsNode = newSymNode(temp) diff --git a/tests/destructor/tmisc_destructors.nim b/tests/destructor/tmisc_destructors.nim index fdcea074b2..3549383925 100644 --- a/tests/destructor/tmisc_destructors.nim +++ b/tests/destructor/tmisc_destructors.nim @@ -28,7 +28,7 @@ proc test(): auto = var (a, b, _) = test() doAssert assign_counter == 0 -doAssert sink_counter == 9 # XXX this is still silly and needs to be investigated +doAssert sink_counter == 12 # + 3 because of the conservative tuple unpacking transformation # bug #11510 proc main =