From a665580b517181ea21f6695202127445aefbbadf Mon Sep 17 00:00:00 2001 From: Charles Cooper Date: Tue, 12 Sep 2023 16:17:58 -0400 Subject: [PATCH] handle empty seqs --- boa/vyper/ir_executor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boa/vyper/ir_executor.py b/boa/vyper/ir_executor.py index 19df379c..e7b62b1a 100644 --- a/boa/vyper/ir_executor.py +++ b/boa/vyper/ir_executor.py @@ -189,6 +189,7 @@ def analyze(self): self.args = [arg.analyze() for arg in self.args] return self + # compile an IR "expr". called for its side effects on builder def compile(self, out=None, out_typ=None): # do a bit of metaprogramming to infer how to compile the args if hasattr(self, "_argnames"): @@ -745,6 +746,9 @@ class Seq(IRExecutor): _name = "seq" def compile(self, out=None, out_typ=None): + if len(self.args) == 0: + self.builder.append("pass") + return for i, arg in enumerate(self.args): if i + 1 < len(self.args): # don't accidentally assign