Skip to content

Commit 9b8270f

Browse files
committed
Fix bug with recursive branching.
1 parent 9cb7c40 commit 9b8270f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Compiler/types.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6636,7 +6636,8 @@ def __getitem__(self, index):
66366636
if isinstance(index, int) and index < 0:
66376637
index += self.sizes[0]
66386638
key = program.curr_tape, tuple(
6639-
(x, x.has_else) for x in program.curr_tape.if_states), str(index)
6639+
(x, None if isinstance(x, bool) else x.has_else)
6640+
for x in program.curr_tape.if_states), str(index)
66406641
if key not in self.sub_cache:
66416642
index = self.check(index, self.sizes[0], self.sizes)
66426643
if len(self.sizes) == 2:

0 commit comments

Comments
 (0)