mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-05 03:14:08 +00:00
Revert "ARC: another critical bugfix; temporary tuples we introduce for tuple unpackaging are not owning the data"
This reverts commit 8b2f8f5430.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user