mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
remove explicit ComplexTypeTag from switch
This commit is contained in:
parent
b81782366b
commit
218cf059dd
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user