Inline else not removing errors
Ziggit
Inline else not removing errors
fn bar() error{ Bar, Foo }!void { return error.Bar; } fn foo() error{Foo}!void { bar() catch |err| switch (err) { error.Bar => {}, inline else => |e| return e, }; } test { try foo(); } > zig test foo.zig foo.zig:8:35: error: expected type 'error{Foo}!void', found 'error{Bar,Foo}' inline else => |e| return e, ^ foo.zig:8:35: note: 'error.Bar' not a member of destination error set foo.zig:5:20: note: function return type ...
0 comments
No comments yet.