Skip to content

Commit 218cf05

Browse files
jjwattandrewrk
authored andcommitted
remove explicit ComplexTypeTag from switch
1 parent b817823 commit 218cf05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/langref/test_tagged_union.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ test "switch on tagged union" {
1515
try expect(@as(ComplexTypeTag, c) == ComplexTypeTag.ok);
1616

1717
switch (c) {
18-
ComplexTypeTag.ok => |value| try expect(value == 42),
19-
ComplexTypeTag.not_ok => unreachable,
18+
.ok => |value| try expect(value == 42),
19+
.not_ok => unreachable,
2020
}
2121
}
2222

0 commit comments

Comments
 (0)