From 9b8270fb527d9fcca37f1663603258ffa8daaf00 Mon Sep 17 00:00:00 2001 From: Marcel Keller Date: Thu, 18 Sep 2025 10:58:41 +0800 Subject: [PATCH] Fix bug with recursive branching. --- Compiler/types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Compiler/types.py b/Compiler/types.py index 4f01390c..2ceda261 100644 --- a/Compiler/types.py +++ b/Compiler/types.py @@ -6636,7 +6636,8 @@ class SubMultiArray(_vectorizable): if isinstance(index, int) and index < 0: index += self.sizes[0] key = program.curr_tape, tuple( - (x, x.has_else) for x in program.curr_tape.if_states), str(index) + (x, None if isinstance(x, bool) else x.has_else) + for x in program.curr_tape.if_states), str(index) if key not in self.sub_cache: index = self.check(index, self.sizes[0], self.sizes) if len(self.sizes) == 2: