Skip to content

Commit

Permalink
remove explicit ComplexTypeTag from switch
Browse files Browse the repository at this point in the history
  • Loading branch information
jjwatt authored and andrewrk committed Sep 11, 2024
1 parent b817823 commit 218cf05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/langref/test_tagged_union.zig
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ test "switch on tagged union" {
try expect(@as(ComplexTypeTag, c) == ComplexTypeTag.ok);

switch (c) {
ComplexTypeTag.ok => |value| try expect(value == 42),
ComplexTypeTag.not_ok => unreachable,
.ok => |value| try expect(value == 42),
.not_ok => unreachable,
}
}

Expand Down

0 comments on commit 218cf05

Please sign in to comment.