Skip to content

Commit

Permalink
Fix bug in conditional output with binary computation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Apr 18, 2024
1 parent 1771535 commit 1616922
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Compiler/GC/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,11 @@ def print_if(self, string):
inst.cond_print_strb(self, string)
def output_if(self, cond):
if Program.prog.options.binary:
raise CompilerError('conditional output not supported')
cint(self).output_if(cond)
@library.if_(cond)
def _():
self.print_reg_plain()
else:
cint(self).output_if(cond)
def reveal(self):
return self
def to_regint(self, dest=None):
Expand Down

0 comments on commit 1616922

Please sign in to comment.