Pass-by-value this
parameter for call is loaded before calls in the argument list (that modify it) apply side-effects
#23471
Labels
bug
Observed behavior contradicts documented or intended behavior
Zig Version
0.15.0-dev.204+d05a3fb1b
Steps to Reproduce and Observed Behavior
This is a reduction from a free list implementation I've been working on.
Run the following via
zig test
:This panic occurs:
This can be resolved by either applying this diff
Or this diff:
Expected Behavior
The side effects by the function calls in the argument list should be observed in the outer call to
ptr
.The text was updated successfully, but these errors were encountered: