diff --git a/cozy/codegen/cxx.py b/cozy/codegen/cxx.py index 275dcf58..1d3649a4 100644 --- a/cozy/codegen/cxx.py +++ b/cozy/codegen/cxx.py @@ -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)]), )