Skip to content

Commit

Permalink
fix tuple copy
Browse files Browse the repository at this point in the history
  • Loading branch information
izgzhen committed Oct 25, 2018
1 parent 266151a commit d1e7e24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cozy/codegen/cxx.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def construct_concrete(self, t : Type, e : Exp, out : Exp):
x = self.fv(t, "x")
indices = range(len(t.ts))
return SSeq(
SEscape("{indent}{rv} = {rhs};\n", ["rv", "rhs"], [x, e]),
SEscape("{indent}" + self.visit(t, x.id) + " = {rhs};\n", ("rhs",), (e,)),
SEscape("{indent}{lhs} = {rv};\n", ["lhs", "rv"],
[out, ETuple([ETupleGet(x, i).with_type(t.ts[i]) for i in indices]).with_type(t)]),
)
Expand Down

0 comments on commit d1e7e24

Please sign in to comment.