-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stage2: if
allows usize
in condition, if the payload is discarded
#13023
Labels
Milestone
Comments
topolarity
added
the
bug
Observed behavior contradicts documented or intended behavior
label
Sep 30, 2022
this is because of the |
its not doing the optional check when the payload is a builtin. the following has the same result test {
if (@sin(5.0)) |_| {}
} |
This issue also applies to error union conditions and while loops and has nothing to do with builtin functions and everything to do with |
Vexu
added a commit
to Vexu/zig
that referenced
this issue
Dec 15, 2022
Vexu
added a commit
to Vexu/zig
that referenced
this issue
Dec 15, 2022
Vexu
added a commit
to Vexu/zig
that referenced
this issue
Dec 16, 2022
TUSF
pushed a commit
to TUSF/zig
that referenced
this issue
May 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Zig Version
0.10.0-dev.4189+17eea918a
Steps to Reproduce
Expected Behavior
Stage 1 does the right thing:
Actual Behavior
The text was updated successfully, but these errors were encountered: