Skip to content

Commit

Permalink
Update hugr-py/src/hugr/cond_loop.py
Browse files Browse the repository at this point in the history
Co-authored-by: Seyon Sivarajah <[email protected]>
  • Loading branch information
aborgna-q and ss2165 authored Aug 8, 2024
1 parent ca8ef5b commit 68795ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hugr-py/src/hugr/cond_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def set_outputs(self, *outputs: Wire) -> None:
sum_type = self.hugr.port_type(sum_wire.out_port())
assert isinstance(sum_type, Sum)
assert len(sum_type.variant_rows) == 2
self._set_parent_output_count(len(sum_type.variant_rows[1]) + len(outputs[1:]))
self._set_parent_output_count(len(sum_type.variant_rows[1]) + len(outputs) - 1)

def set_loop_outputs(self, sum_wire: Wire, *rest: Wire) -> None:
"""Set the outputs of the loop body. The first wire must be the sum type
Expand Down

0 comments on commit 68795ba

Please sign in to comment.