Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Represent error sets through InternPool #2201

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FnControlOption
Copy link
Contributor

Preparatory work for peer type resolution with error unions

Regression 1: link to error set is no longer included in "Go to ..." when hovering.

Regression 2: given error set E = error{A,B} and struct S, E!S is printed as error{A,B}!S. However, this is consistent with how Zig would normally print E!S in e.g. std.debug.print.

const std = @import("std");
const E = error{A,B};
const S = struct{};
pub fn main() !void {
    std.debug.print("{}", .{E!S}); // => error{A,B}!S
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant