swap
silently broken for objects inside functions (js target)
#16771
Labels
swap
silently broken for objects inside functions (js target)
#16771
In the example below,
foo
should do the same asswap
(at least that's what the C target does).Example
Additional Information
The above function compiles (basically) to this JavaScript code:
However this only swaps the local variables of the function, as JavaScript uses "call by sharing".
In contrast, the C target compiles to
... where the whole struct is swapped.
The text was updated successfully, but these errors were encountered: