Skip to content

Commit

Permalink
fix AggregateInit
Browse files Browse the repository at this point in the history
  • Loading branch information
shiinamiyuki committed Nov 5, 2024
1 parent b51cfb6 commit 4b4e4f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion luisa_lang/codegen/cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ def impl() -> None:
case hir.AggregateInit():
assert expr.type
ty = self.base.type_cache.gen(expr.type)
self.body.writeln(f"{ty} v{vid}{{}};")
self.body.writeln(
f"{ty} v{vid}{{ {','.join(self.gen_expr(e) for e in expr.args)} }};")
case _:
raise NotImplementedError(
f"unsupported expression: {expr}")
Expand Down

0 comments on commit 4b4e4f1

Please sign in to comment.