Skip to content

incremental: assertion failure when changing the kind of a container #24217

Open
@jacobly0

Description

@jacobly0
#target=x86_64-linux-selfhosted
#update=initial version
#file=main.zig
const T = packed struct {};
pub fn main() void {
    @compileLog(T);
}
#expect_error=main.zig:3:5: error: found compile log statement
#expect_compile_log=@as(type, main.T)
#update=change packed struct to packed union
#file=main.zig
const T = packed union {};
pub fn main() void {
    @compileLog(T);
}
#expect_error=main.zig:3:5: error: found compile log statement
#expect_compile_log=@as(type, main.T)

Asserts with compiler safety, reports success even in the presence of other compiler errors without compiler safety.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.incremental compilationProblem occurs only when reusing compiler state.miscompilationThe compiler reports success but produces semantically incorrect code.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions