parent
49d1822c8f
commit
d56848878c
5 changed files with 25 additions and 5 deletions
|
|
@ -352,6 +352,8 @@ proc passCopyToSink(n: PNode; c: var Con): PNode =
|
|||
("passing '$1' to a sink parameter introduces an implicit copy; " &
|
||||
"use 'move($1)' to prevent it") % $n)
|
||||
else:
|
||||
if c.graph.config.selectedGC in {gcArc, gcOrc}:
|
||||
assert(not containsGarbageCollectedRef(n.typ))
|
||||
result.add newTree(nkAsgn, tmp, p(n, c, normal))
|
||||
result.add tmp
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue