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
Maybe worth keeping this open as a specific case, because a fix for optionals which use the some + data structure is comparatively straightforward: unwrapping is already null-checked in safe modes, this could check specifically for 0x01 and handle both types of error on the cold path, which should be broadly as efficient when the program is not immediately on the verge of crashing.
Not as straightforward for pointers, no idea how any later niche optimizations would interact with Debug and ReleaseSafe, but that's a problem for later.
Zig Version
v0.14.0-dev.2238+1db8cade5
Steps to Reproduce and Observed Behavior
This passes in Debug mode, but fails in ReleaseFast:
Expected Behavior
Expect a panic when the
some
field is0xaa
on unwrap. The condition is detectable, because using@as([4096]u8, undefined)
setssome
to0x01
.The text was updated successfully, but these errors were encountered: