Hello,
I was trying to do an udp server / client with the new Io implementation and wanted to change the port on an IpAddress. But I get an error and now wanted to just know if I am doing something wrong or is this a Zig issue?
I tried to find any issue on github/codeberg regarding this but I didn’t find anything
Here is an example code where I get this error:
const std = @import(“std”);
pub fn main() !void {
var address: std.Io.net.IpAddress = try .parse("127.0.0.1",0);
address.setPort(8080);
}
And the error I get is:
master/lib/std/Io/net.zig:156:9: error: else prong required when switching on type '*Io.net.IpAddress'
switch (a) {
^~~~~~
referenced by:
main: src/main.zig:5:2