We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
0.10.0-dev.3559+d2342370f
This is broken, prints: ...
...
const std = @import("std"); pub fn main() !void { const arr = [_]u8{0} ** 3; for (arr) |_, idx| { std.debug.print("{s}", .{ if (idx % 2 == 0) "." else "-"}); } }
The valid result must be .-.
.-.
This is valid code:
const std = @import("std"); pub fn main() !void { const arr = [_]u8{0} ** 3; for (arr) |_, idx| { var str = if (idx % 2 == 0) "." else "-"; std.debug.print("{s}", .{ str }); } }
No errors, just incorrect result from If expression.
The text was updated successfully, but these errors were encountered:
duplicate of #5230, note that this works with -fno-stage1
-fno-stage1
Sorry, something went wrong.
No branches or pull requests
Zig Version
0.10.0-dev.3559+d2342370f
Steps to Reproduce
This is broken, prints:
...
Expected Behavior
The valid result must be
.-.
This is valid code:
Actual Behavior
No errors, just incorrect result from If expression.
The text was updated successfully, but these errors were encountered: