Skip to content

Stage2: false dependency loop #12325

@Vexu

Description

@Vexu
const S = struct {
    a: *[@sizeOf(S)]u8,
};
test {
    var s: S = undefined;
    _ = s;
}
a.zig:19:10: error: struct 'a.S' depends on itself
    a: *[@sizeOf(S)]u8,
         ^~~~~~~~~~

Should be fixed by implementing lazy pointer types, lazy array types, or both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions