mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
docs: mention @unionInit in the union section
This commit is contained in:
parent
3ad9349f09
commit
273c2b5c25
@ -2743,6 +2743,9 @@ test "simple union" {
|
||||
<p>
|
||||
In order to use {#link|switch#} with a union, it must be a {#link|Tagged union#}.
|
||||
</p>
|
||||
<p>
|
||||
To initialize a union when the tag is a {#link|comptime#}-known name, see {#link|@unionInit#}.
|
||||
</p>
|
||||
|
||||
{#header_open|Tagged union#}
|
||||
<p>Unions can be declared with an enum tag type.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user