We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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.13.0-dev.73+db890dbae
Run test on the following code:
const BareUnion = union { dog: i32, cat: i32, }; var bare_union: BareUnion = .{ .dog = 123 }; fn useDog() void { bare_union = .{ .dog = 777 }; } test "useDog" { useDog(); }
Compilation bails out with the following message:
Trace/breakpoint trap (core dumped)
No error when the following variants are used instead:
fn useDog() void { bare_union = BareUnion{ .dog = 777 }; } fn useDog() void { const c = .{ .dog = 777 }; bare_union = c; }
No error
The text was updated successfully, but these errors were encountered:
looks like duplicate of #19832
Sorry, something went wrong.
I believe so.
No branches or pull requests
Zig Version
0.13.0-dev.73+db890dbae
Steps to Reproduce and Observed Behavior
Run test on the following code:
Compilation bails out with the following message:
No error when the following variants are used instead:
Expected Behavior
No error
The text was updated successfully, but these errors were encountered: