remove explicit ComplexTypeTag from switch

This commit is contained in:
Jesse Wattenbarger 2024-09-10 14:09:54 -04:00 committed by Andrew Kelley
parent b81782366b
commit 218cf059dd

View File

@ -15,8 +15,8 @@ test "switch on tagged union" {
try expect(@as(ComplexTypeTag, c) == ComplexTypeTag.ok); try expect(@as(ComplexTypeTag, c) == ComplexTypeTag.ok);
switch (c) { switch (c) {
ComplexTypeTag.ok => |value| try expect(value == 42), .ok => |value| try expect(value == 42),
ComplexTypeTag.not_ok => unreachable, .not_ok => unreachable,
} }
} }