Skip to content

Commit

Permalink
<bugfix> fixed throwing error in createassignment in case of a tuple …
Browse files Browse the repository at this point in the history
…assignment of managed variables with a custom copy method.
  • Loading branch information
hiemstar committed May 27, 2024
1 parent 95a7e84 commit f4caa8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/terralib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3363,7 +3363,7 @@ function typecheck(topexp,luaenv,simultaneousdefinitions)
regular.rhs:insert(rhs[i])
end
end
if #byfcall>0 and #byfcall+#regular>1 then
if #byfcall.lhs>0 and #byfcall.lhs+#regular.lhs>1 then
--__copy can potentially mutate left and right-handsides in an
--assignment. So we prohibit assignments that may involve something
--like a swap: u,v = v, u.
Expand Down

0 comments on commit f4caa8b

Please sign in to comment.