-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
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
[Bug][Compiler-v2] Cannot check equality between mutable and immutable reference #11434
Labels
bug
Something isn't working
compiler-v2
stale-exempt
Prevents issues from being automatically marked and closed as stale
Comments
rahxephon89
added
bug
Something isn't working
stale-exempt
Prevents issues from being automatically marked and closed as stale
compiler-v2
labels
Dec 20, 2023
wrwg
added a commit
that referenced
this issue
Feb 22, 2024
This enables the comparison of references with mixed mutability (`&x == &mut y`), and introduces generation of the `FreezeRef` operation when an argument is widned from mutable to immutable references. The later applies for any kind of function call, not only equalities. Without freeze, certain scenarios produce borrow errors in reference safety and/or the bytecode verifier. Note that this PR is intended to work together with the new reference safety analysis, so some tests do not yet work without it. Fixes #12151 Fixes #11738 Fixes #11434
wrwg
added a commit
that referenced
this issue
Feb 26, 2024
This enables the comparison of references with mixed mutability (`&x == &mut y`), and introduces generation of the `FreezeRef` operation when an argument is widned from mutable to immutable references. The later applies for any kind of function call, not only equalities. Without freeze, certain scenarios produce borrow errors in reference safety and/or the bytecode verifier. Note that this PR is intended to work together with the new reference safety analysis, so some tests do not yet work without it. Fixes #12151 Fixes #11738 Fixes #11434
wrwg
added a commit
that referenced
this issue
Feb 26, 2024
This enables the comparison of references with mixed mutability (`&x == &mut y`), and introduces generation of the `FreezeRef` operation when an argument is widned from mutable to immutable references. The later applies for any kind of function call, not only equalities. Without freeze, certain scenarios produce borrow errors in reference safety and/or the bytecode verifier. Note that this PR is intended to work together with the new reference safety analysis, so some tests do not yet work without it. Fixes #12151 Fixes #11738 Fixes #11434
wrwg
added a commit
that referenced
this issue
Feb 26, 2024
This enables the comparison of references with mixed mutability (`&x == &mut y`), and introduces generation of the `FreezeRef` operation when an argument is widned from mutable to immutable references. The later applies for any kind of function call, not only equalities. Without freeze, certain scenarios produce borrow errors in reference safety and/or the bytecode verifier. Note that this PR is intended to work together with the new reference safety analysis, so some tests do not yet work without it. Fixes #12151 Fixes #11738 Fixes #11434
wrwg
added a commit
that referenced
this issue
Feb 27, 2024
This enables the comparison of references with mixed mutability (`&x == &mut y`), and introduces generation of the `FreezeRef` operation when an argument is widned from mutable to immutable references. The later applies for any kind of function call, not only equalities. Without freeze, certain scenarios produce borrow errors in reference safety and/or the bytecode verifier. Note that this PR is intended to work together with the new reference safety analysis, so some tests do not yet work without it. Fixes #12151 Fixes #11738 Fixes #11434
github-project-automation
bot
moved this from 📋 Backlog
to ✅ Done
in Move Language and Runtime
Feb 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
compiler-v2
stale-exempt
Prevents issues from being automatically marked and closed as stale
🐛 Bug
After landing the PR #11371, the compiler V2 will generate an error when trying to check equality between mutable and immutable reference. For instance, for the following function:
The compiler will generate the error:
The text was updated successfully, but these errors were encountered: