Skip to content

segfault using non empty init for tuple with comptime fields #18400

@xdBronch

Description

@xdBronch

Zig Version

0.12.0-dev.1856+94c63f31f

Steps to Reproduce and Observed Behavior

test {
    const a: struct { comptime comptime_int = 0 } = .{0};
    _ = a;
}

https://gist.github.com/xdBronch/95e58100607a391599c2386efcd7d93c

Expected Behavior

probably test pass since the init has the same value as the default value, error otherwise

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.frontendTokenization, parsing, AstGen, Sema, and Liveness.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions