zig icon indicating copy to clipboard operation
zig copied to clipboard

`unhandled error value` in `Ip4Address.resolveIP`

Open IntegratedQuantum opened this issue 3 years ago • 0 comments

Zig Version

0.11.0-dev.1182+fd0fb26ab

Steps to Reproduce and Observed Behavior

Trying to call Ip4Address.resolveIP leads to a compiler error:

/home/mint/Downloads/zig/lib/std/net.zig:241:60: error: switch must handle all possibilities
        if (parse(name, port)) |ip4| return ip4 else |err| switch (err) {
                                                           ^~~~~~
/home/mint/Downloads/zig/lib/std/net.zig:241:60: note: unhandled error value: 'error.NonCanonical'

Expected Behavior

It's not doing much apart from calling Ip4Address.parse and since it gives a compiler error since #9538 it seems that nobody is even using it. So maybe Ip4Address.resolveIP should be removed entirely?

IntegratedQuantum avatar Jan 05 '23 16:01 IntegratedQuantum