You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS: While yes, std.mem.swap is better for this use case, I constructed a minimal example here. You should be able to use for this rotating multiple values (e.g. x, y, z = .{y, z, x};) too.
Zig Version
0.12.0
Steps to Reproduce and Observed Behavior
This fails,
x
andy
are both 5.Expected Behavior
The test does not fail or gives a compile error that swapping values this way (like in Python) doesn't work, even if the syntax suggests it.
The text was updated successfully, but these errors were encountered: