fixes a minor regression
This commit is contained in:
parent
112511084d
commit
4603197fe8
1 changed files with 1 additions and 1 deletions
|
|
@ -555,7 +555,7 @@ proc ensureDestruction(arg, orig: PNode; c: var Con; s: var Scope): PNode =
|
||||||
result = newNodeIT(nkStmtListExpr, arg.info, arg.typ)
|
result = newNodeIT(nkStmtListExpr, arg.info, arg.typ)
|
||||||
if orig == s.escapingExpr and s.parent != nil:
|
if orig == s.escapingExpr and s.parent != nil:
|
||||||
let tmp = c.getTemp(s.parent[], arg.typ, arg.info)
|
let tmp = c.getTemp(s.parent[], arg.typ, arg.info)
|
||||||
result.add c.genSink(s.parent[], tmp, arg, isDecl = true)
|
result.add c.genSink(s, tmp, arg, isDecl = true)
|
||||||
result.add tmp
|
result.add tmp
|
||||||
s.parent[].final.add c.genDestroy(tmp)
|
s.parent[].final.add c.genDestroy(tmp)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue