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
I think that the following code can be mis-compiled
(x, y) = (y, x);
This should swap x and y but, instead, we first assign "x = y;" and then "y = x;" which sets both x and y to the value that was in y.
More specifically, there is a potential problem for tuple assignments if the right hand side depends on the variables on the left hand side.
A workaround until this is fixed is to introduce some intermediate variables
let (t1, t2) = (y, x); (x, y) = (t1, t2);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think that the following code can be mis-compiled
This should swap x and y but, instead, we first assign "x = y;" and then "y = x;" which sets both x and y to the value that was in y.
More specifically, there is a potential problem for tuple assignments if the right hand side depends on the variables on the left hand side.
A workaround until this is fixed is to introduce some intermediate variables
The text was updated successfully, but these errors were encountered: