Skip to content

fix: passing signed information to the expression generator to ensure that division uses the correct operation#1631

Merged
Angus-Bethke-Bachmann merged 7 commits intomasterfrom
anbt/PRG-3923
Mar 19, 2026
Merged

fix: passing signed information to the expression generator to ensure that division uses the correct operation#1631
Angus-Bethke-Bachmann merged 7 commits intomasterfrom
anbt/PRG-3923

Conversation

@Angus-Bethke-Bachmann
Copy link
Copy Markdown
Contributor

Changed

  • Passing signed information to the expression generator to ensure that division uses the correct operation

Testing

  • Added a codegen test to ensure that the operation is performed when two unsigned integers are divided

Copy link
Copy Markdown
Member

@mhasel mhasel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR changes the behaviour of MOD as well as division - the added codegen tests however only seem to cover /. I'd like to see some tests using MOD added aswell.

Comment thread src/codegen/generators/expression_generator.rs
@Angus-Bethke-Bachmann Angus-Bethke-Bachmann merged commit 6217f03 into master Mar 19, 2026
33 checks passed
@Angus-Bethke-Bachmann Angus-Bethke-Bachmann deleted the anbt/PRG-3923 branch March 19, 2026 13:26
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.

An error occurred during division of an unsigned variable

2 participants