| ... | ... | @@ -3585,7 +3585,7 @@ const Type = enum { |
| 3585 | 3585 | not_ok, |
| 3586 | 3586 | }; |
| 3587 | 3587 | |
| 3588 | | // Declare a specific instance of the enum variant. |
| 3588 | // Declare a specific enum field. |
| 3589 | 3589 | const c = Type.ok; |
| 3590 | 3590 | |
| 3591 | 3591 | // If you want access to the ordinal value of an enum, you |
| ... | ... | @@ -3634,13 +3634,13 @@ test "enum method" { |
| 3634 | 3634 | try expect(!p.isClubs()); |
| 3635 | 3635 | } |
| 3636 | 3636 | |
| 3637 | | // An enum variant of different types can be switched upon. |
| 3637 | // An enum can be switched upon. |
| 3638 | 3638 | const Foo = enum { |
| 3639 | 3639 | string, |
| 3640 | 3640 | number, |
| 3641 | 3641 | none, |
| 3642 | 3642 | }; |
| 3643 | | test "enum variant switch" { |
| 3643 | test "enum switch" { |
| 3644 | 3644 | const p = Foo.number; |
| 3645 | 3645 | const what_is_it = switch (p) { |
| 3646 | 3646 | Foo.string => "this is a string", |