aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-09-13 13:29:43 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-09-13 13:33:11 -0400
commit22e39e1e5ab42c2c3d33eeb6797f5835b2004fe3 (patch)
treec5c9dc35157c268c7196abdc83aa45e1bdad10ee /doc
parent77fd147b26b8213038ea60dc9eb990bbf871f3d6 (diff)
downloadzig-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.in4
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#}