ARC: another critical bugfix; temporary tuples we introduce for tuple unpackaging are not owning the data

This commit is contained in:
Araq 2019-11-22 21:41:35 +01:00
commit 8b2f8f5430
2 changed files with 2 additions and 1 deletions

View file

@ -60,6 +60,7 @@ 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)