Skip to content

Conversation

@hargoniX
Copy link
Contributor

@hargoniX hargoniX commented Nov 1, 2025

This PR fixes a case of overeager constant folding on UInts where the compiler would mistakenly
assume 0 - x = x.

@hargoniX hargoniX requested a review from leodemoura as a code owner November 1, 2025 02:29
@hargoniX hargoniX force-pushed the hbv/fix_uint_const_fold branch from bf4cee5 to 3544d4d Compare November 1, 2025 02:30
@hargoniX hargoniX added the changelog-language Language features and metaprograms label Nov 1, 2025
@hargoniX hargoniX enabled auto-merge November 1, 2025 02:30
@hargoniX hargoniX added changelog-compiler Compiler, runtime, and FFI and removed changelog-language Language features and metaprograms labels Nov 1, 2025
@hargoniX hargoniX added this pull request to the merge queue Nov 1, 2025
Merged via the queue into master with commit 51ef1dc Nov 1, 2025
26 of 27 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Nov 1, 2025
This PR fixes a case of overeager constant folding on Nat where the
compiler would mistakenly assume `0 - x = x` (see also #11042 for the
same bug on UInts).
github-merge-queue bot pushed a commit that referenced this pull request Nov 1, 2025
This PR enforces users of the constant folder API to provide proofs of
their algebraic properties,
thus hopefully avoiding bugs such as #11042 and #11043 in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-compiler Compiler, runtime, and FFI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants