Skip to content

Commit

Permalink
Merge pull request #75 from izgzhen/fix-tuple
Browse files Browse the repository at this point in the history
fix tuple copy
  • Loading branch information
Calvin-L authored Oct 26, 2018
2 parents 266151a + d1e7e24 commit cb7fd1e
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 cb7fd1e

Please sign in to comment.