From 1e64727aa9ba892ad13c3721279328398aa34ce4 Mon Sep 17 00:00:00 2001 From: Charles Cooper Date: Tue, 1 Oct 2024 12:37:14 -0400 Subject: [PATCH] fix variable --- vyper/codegen/stmt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vyper/codegen/stmt.py b/vyper/codegen/stmt.py index 965e442ab6..0b6e813816 100644 --- a/vyper/codegen/stmt.py +++ b/vyper/codegen/stmt.py @@ -214,9 +214,10 @@ def _parse_For_range(self): raise TypeCheckFailure("unreachable: unchecked 0 bound") varname = self.stmt.target.target.id - assert varname not in forvars i = IRnode.from_list(self.context.fresh_varname("range_ix"), typ=target_type) + + assert varname not in self.context.forvars self.context.forvars[varname] = i loop_body = ["seq"]