mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
remove explicit ComplexTypeTag from switch
This commit is contained in:
parent
b81782366b
commit
218cf059dd
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue