Tuple assignment incorrect #774

d3zd3z opened this Issue Apr 18, 2014 · 2 comments


None yet

3 participants

d3zd3z 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.

zhaihj 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.



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

@fasterthanlime fasterthanlime referenced this issue in zhaihj/rock Aug 15, 2014

Hello from mainline #27

@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