We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unconstrained fn main(mut x: i32) { mutate_alias(&mut x, &mut x); assert_eq(x, 1); } unconstrained fn mutate_alias(x: &mut i32, y: &mut i32) { *x = 0; *y = 1; assert_eq(*x, 1); }
The test to pass
Test fails because we wrongly optimize the assert_eq(*x, 1) to assert_eq(0, 1), wrongly assuming that x can't be aliased to y.
assert_eq(*x, 1)
assert_eq(0, 1)
x
y
To fix this, parameters should be pessimistically assumed to be aliases to all other parameters.
None
No response
The text was updated successfully, but these errors were encountered:
jfecher
Successfully merging a pull request may close this issue.
Aim
Expected Behavior
The test to pass
Bug
Test fails because we wrongly optimize the
assert_eq(*x, 1)
toassert_eq(0, 1)
, wrongly assuming thatx
can't be aliased toy
.To fix this, parameters should be pessimistically assumed to be aliases to all other parameters.
To Reproduce
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
No response
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: