Skip to content

Conversation

@jacobly0
Copy link
Member

@jacobly0 jacobly0 commented Mar 7, 2023

Unsigned integers are never less than zero, and so zig helpfully deleted the entire case. 😁

Closes #14816

jacobly0 added 2 commits March 7, 2023 03:00
Unsigned integers are never less than zero, and so zig
helpfully deleted the entire case. :D

Closes ziglang#14816
@adriandelgado
Copy link

When I found this bug, it only showed up when using division assignment, but I see you are using normal division operators in your tests. However, I know nothing about compiler internals, so it might be the same, idk.

@jacobly0
Copy link
Member Author

jacobly0 commented Mar 7, 2023

When I found this bug, it only showed up when using division assignment, but I see you are using normal division operators in your tests. However, I know nothing about compiler internals, so it might be the same, idk.

What's important isn't / vs /=, but const vs var. As usual, I checked that the added test fails without the fix and succeeds with the fix.

@andrewrk andrewrk enabled auto-merge March 7, 2023 23:44
@andrewrk andrewrk merged commit 6fc1621 into ziglang:master Mar 8, 2023
@jacobly0 jacobly0 deleted the fix-big-div branch March 8, 2023 15:28
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.

Inconsistency between division operator vs assignment (debug only)

3 participants