Skip to content

Commit

Permalink
fix list codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Dec 27, 2023
1 parent 3a642fb commit 27441ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vyper/codegen/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,9 @@ def parse_List(self):
if len(self.expr.elements) == 0:
return IRnode.from_list("~empty", typ=typ)

for e in self.expr.elements:
if "type" not in e._metadata:
e._metadata["type"] = typ.subtype
multi_ir = [Expr(x, self.context).ir_node for x in self.expr.elements]

return IRnode.from_list(["multi"] + multi_ir, typ=typ)
Expand Down

0 comments on commit 27441ec

Please sign in to comment.