Skip to content

enum with 1 member causing segfault #647

@andrewrk

Description

@andrewrk
const Id = enum {
    Eof,
};

export fn entry() {
    bar(Id.Eof);
}
fn bar(id: Id) {
    while (true) {
        if (id == Id.Eof) {
            break;
        }
        @panic("hi");
    }
}

zig build-obj test.zig segfaults

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions