mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +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);
|
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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue