From 22e39e1e5ab42c2c3d33eeb6797f5835b2004fe3 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 13 Sep 2018 13:29:43 -0400 Subject: 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. --- doc/langref.html.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') 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" {

Converts an enumeration value into its integer tag type.

+

+ If the enum has only 1 possible value, the resut is a comptime_int + known at {#link|comptime#}. +

{#see_also|@intToEnum#} {#header_close#} -- cgit v1.2.3