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

@typeInfo can't handle global error set type (`anyerror`) #1936

andrewrk opened this Issue Feb 8, 2019 · 1 comment


None yet
1 participant
Copy link

commented Feb 8, 2019

    if (type_entry == ira->codegen->builtin_types.entry_global_error_set) {
        zig_panic("TODO implement @typeInfo for global error set");

@andrewrk andrewrk added the bug label Feb 8, 2019

@andrewrk andrewrk added this to the 0.4.0 milestone Feb 8, 2019


This comment has been minimized.

Copy link
Member Author

commented Feb 9, 2019

@tgschultz I know you use this function a lot. We're going to have to change one of the TypeInfo types to fix this.

Here's my proposal:

-    pub const ErrorSet = struct {
-        errors: []Error,
-    };
+   pub const ErrorSet = ?[]Error;

The value would be null if it's the global error set.

@andrewrk andrewrk added the breaking label Feb 9, 2019

@andrewrk andrewrk closed this in 080dd27 Mar 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.