Closed degory closed 7 months ago
Allow if expressions to return void values when in a context where void is expected, for example as the body of a function returning void.
print_size(v: int) => if v > 10 then write_line("big") else write_line("small") fi;
As the result is not actually consumed, we can allow void if expressions with no else
print_size_if_big(v: int) => if v > 10 then write_line("big") fi;
Allow if expressions to return void values when in a context where void is expected, for example as the body of a function returning void.
As the result is not actually consumed, we can allow void if expressions with no else