diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index c50fd4536c..15f7f0f34a 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -212,22 +212,36 @@ proc optAsgnLoc(a: TLoc, t: PType, field: PRope): TLoc = result.heapRoot = a.heapRoot proc genOptAsgnTuple(p: BProc, dest, src: TLoc, flags: TAssignmentFlags) = + let newflags = + if src.k == locData: + flags + { needToCopy } + elif tfShallow in dest.t.flags: + flags - { needToCopy } + else: + flags for i in 0 ..