Fix bug with recursive branching.

This commit is contained in:
Marcel Keller
2025-09-18 10:58:41 +08:00
parent 9cb7c40eaf
commit 9b8270fb52

View File

@@ -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: