docs: mention @unionInit in the union section

This commit is contained in:
Andrew Kelley 2019-07-05 14:10:50 -04:00
parent 3ad9349f09
commit 273c2b5c25
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -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.