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

Assert hit when symbol does not exist (edge case) #1591

Closed
UniqueID1 opened this Issue Sep 26, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@UniqueID1

UniqueID1 commented Sep 26, 2018

const Car = struct {
    foo: *SymbolThatDoesNotExist,

    pub fn init() !Car {}
};

pub fn main() void {
    const car = Car.init();
}

init needs to return !Car for this assert to hit. It can not be anything else.

zig/src/result.hpp:16: void assertNoError(Error): Assertion `err == ErrorNone' failed.

@andrewrk andrewrk added this to the 0.4.0 milestone Sep 26, 2018

@andrewrk andrewrk added the bug label Sep 26, 2018

@andrewrk andrewrk modified the milestones: 0.4.0, 0.3.0 Sep 26, 2018

@andrewrk andrewrk closed this in 1c26c2f Sep 26, 2018

emekoi added a commit to emekoi/zig that referenced this issue Sep 27, 2018

emekoi added a commit to emekoi/zig that referenced this issue Sep 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment