Skip to content
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

Tuple assignment incorrect #774

d3zd3z opened this issue Apr 18, 2014 · 2 comments


Copy link

commented Apr 18, 2014

The following code

a := 1
b := 2
(a, b) = (b, a+b)

generates the incorrect result. The generated code doesn't use a temporary, and clobbers the value of 'a' before computing 'a+b'. A simpler expression, such as

(a, b) = (b, a)

does seem to work.


This comment has been minimized.

Copy link

commented Jun 27, 2014

As a temporary solution, if a member is not variableAccess, temporary variable will be used.
Here's my code but I think it can be done better.



This comment has been minimized.

Copy link

commented Aug 15, 2014

@zhaihj, your code doesn't look too bad :)

fasterthanlime added a commit that referenced this issue Aug 15, 2014

@fasterthanlime fasterthanlime added this to the 0.9.9 milestone Aug 15, 2014

@fasterthanlime fasterthanlime self-assigned this Aug 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.