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.4197+9a2f17f9f
linux x86-64
pub fn main() !void { // works fine std.log.info("'{s}'", .{if (0 == 0) "yep" else "nop"}); std.log.info("'{s}'", .{if (0 == 1) "yep" else "nop"}); var i: i32 = 0; // misbehaves with variable std.log.info("'{s}'", .{if (i == 0) "yep" else "NOP"}); std.log.info("'{s}'", .{if (i == 1) "yep" else "NOP"}); // these will not compile in fstage1; works correctly in stage2 // error: expected type '*const [3:0]u8', found '*const [4:0]u8' // std.log.info("'{s}'", .{if (i == 0) "yep" else "nope"}); // std.log.info("'{s}'", .{if (i == 1) "yep" else "nope"}); }
> zig build run info: 'yep' info: 'NOP' info: 'yep' info: 'NOP' info: 'yep' info: 'NOPE'
> zig build run -fstage1 info: 'yep' info: 'NOP' info: 'yep' info: 'yep' // should be NOP // compile error with the last two statements uncommented
The text was updated successfully, but these errors were encountered:
duplicate of #5230
Sorry, something went wrong.
No branches or pull requests
Zig Version
0.10.0-dev.4197+9a2f17f9f
Steps to Reproduce
linux x86-64
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: