diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-09-13 13:29:43 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-09-13 13:33:11 -0400 |
| commit | 22e39e1e5ab42c2c3d33eeb6797f5835b2004fe3 (patch) | |
| tree | c5c9dc35157c268c7196abdc83aa45e1bdad10ee /doc | |
| parent | 77fd147b26b8213038ea60dc9eb990bbf871f3d6 (diff) | |
| download | zig-22e39e1e5ab42c2c3d33eeb6797f5835b2004fe3.tar.gz zig-22e39e1e5ab42c2c3d33eeb6797f5835b2004fe3.zip | |
fix tagged union with only 1 field tripping assertion
closes #1495
now the tag type of an enum with only 1 item is comptime_int.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/langref.html.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in index b13427da90..6f12f0339f 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -5483,6 +5483,10 @@ test "main" { <p> Converts an enumeration value into its integer tag type. </p> + <p> + If the enum has only 1 possible value, the resut is a <code class="zig">comptime_int</code> + known at {#link|comptime#}. + </p> {#see_also|@intToEnum#} {#header_close#} |
