remove explicit ComplexTypeTag from switch
This commit is contained in:
committed by
Andrew Kelley
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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user