fixes #21703; moveOrCopy should consider when vm (#21721)

(cherry picked from commit 0f226c0e48)
This commit is contained in:
ringabout
2023-04-24 20:57:48 +08:00
committed by narimiran
parent 7b99712bcf
commit 579efdabb0

View File

@@ -1054,7 +1054,8 @@ proc moveOrCopy(dest, ri: PNode; c: var Con; s: var Scope, isDecl = false): PNod
else:
result = newTree(nkFastAsgn, dest, p(ri, c, s, normal))
else:
case ri.kind
let ri2 = if ri.kind == nkWhen: ri[1][0] else: ri
case ri2.kind
of nkCallKinds:
result = c.genSink(dest, p(ri, c, s, consumed), isDecl)
of nkBracketExpr: