| author | |
| committer | |
| log | bf7ebfa67af78da3ad40869cc61aecb594f9fc74 |
| tree | d03e684951570de0b03428a4c89229e463701039 |
| parent | 2e7d28dd0d27d94945ac5f131d7f7b4e03bc0024 |
The following test fails since NonCanonical is not handled
test "foo" {
std.net.Ip4Address.resolveIp("1.1.1.1", 0) catch unreachable;
}
/usr/lib/zig/std/net.zig:240:60: error: switch must handle all possibilities
if (parse(name, port)) |ip4| return ip4 else |err| switch (err) {
^~~~~~
/usr/lib/zig/std/net.zig:240:60: note: unhandled error value: 'error.NonCanonical'
referenced by:
test.foo: src/dhcp.zig:383:231 files changed, 1 insertions(+), 0 deletions(-)
lib/std/net.zig+1| ... | @@ -264,6 +264,7 @@ pub const Ip4Address = extern struct { | ... | @@ -264,6 +264,7 @@ pub const Ip4Address = extern struct { |
| 264 | error.InvalidEnd, | 264 | error.InvalidEnd, |
| 265 | error.InvalidCharacter, | 265 | error.InvalidCharacter, |
| 266 | error.Incomplete, | 266 | error.Incomplete, |
| 267 | error.NonCanonical, | ||
| 267 | => {}, | 268 | => {}, |
| 268 | } | 269 | } |
| 269 | return error.InvalidIPAddressFormat; | 270 | return error.InvalidIPAddressFormat; |