Skip to content

Conversation

@zhekai-jiang
Copy link
Contributor

This is to fix a newly-discovered subtle bug, following #1626. Essentially for Unit functions without a return statement, we add a return statement at the end so that it is not rewritten into an infinite while loop. We assumed before that all functions have body wrapped in a Block object, but actually this may not be the case.

(Interestingly, we didn’t change any test case, and it was not an issue on our x86/64 laptops and on CI (function bodies were always wrapped in Blocks). But I accidentally got an issue when I was testing things on a different Mac with Apple Silicon (ARM architecture), where sometimes if the function has, say, only an If statement, the body will simply be that If object instead of that If wrapped inside a Block object.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant