We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25d3713 commit 175d018Copy full SHA for 175d018
doc/langref.html.in
@@ -3585,7 +3585,7 @@ const Type = enum {
3585
not_ok,
3586
};
3587
3588
-// Declare a specific instance of the enum variant.
+// Declare a specific enum field.
3589
const c = Type.ok;
3590
3591
// If you want access to the ordinal value of an enum, you
@@ -3634,13 +3634,13 @@ test "enum method" {
3634
try expect(!p.isClubs());
3635
}
3636
3637
-// An enum variant of different types can be switched upon.
+// An enum can be switched upon.
3638
const Foo = enum {
3639
string,
3640
number,
3641
none,
3642
3643
-test "enum variant switch" {
+test "enum switch" {
3644
const p = Foo.number;
3645
const what_is_it = switch (p) {
3646
Foo.string => "this is a string",
0 commit comments