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
rockssalt05
changed the title
Sentinel value isn't set when returning sentinel terminated array from a function
Sentinel value isn't set when array is initialized
May 3, 2025
Uh oh!
There was an error while loading. Please reload this page.
Zig Version
0.15.0-dev.386+2e35fdd03
Steps to Reproduce and Observed Behavior
Run this program with
zig test
Whether the
@as()
is there or not shouldn't matter if I'm not mistakenIt works as expected if you remove the
if
statementUsing
func1
, it crashes with a garbage sentinel valueExpected Behavior
func1
andfunc2
behave the sameThe text was updated successfully, but these errors were encountered: