003 style record unknown field

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.kz

Actual compiler output

🎯 Compiler coordination: Passes: 20 (flow-based: elaborate, analysis, emission)
Error: output_emitted.zig:109:112: error: no field named 'fg' in struct 'output_emitted.main_module.Style'
        _ = main_module.write_styled_event.handler(.{ .text = "▌", .style = .{ .bold = false, .dim = false, .fg = 0x5A56E0 } });
                                                                                                               ^~
output_emitted.zig:83:19: note: struct declared here
    const Style = struct {
                  ^~~~~~
referenced by:
    main: output_emitted.zig:151:22
    callMain [inlined]: /opt/homebrew/Cellar/zig/0.15.2_1/lib/zig/std/start.zig:618:22
    callMainWithArgs [inlined]: /opt/homebrew/Cellar/zig/0.15.2_1/lib/zig/std/start.zig:587:20
    main: /opt/homebrew/Cellar/zig/0.15.2_1/lib/zig/std/start.zig:602:28
    1 reference(s) hidden; use '-freference-trace=5' to see all references

Must fail at backend compile:

Code generation must reject the program.

Error output must contain

no field named 'fg' in struct

Flows

flow ~write-styled click a branch to expand · @labels scroll to their anchor
write-styled (text: "▌", style: { bold: false, dim: false, fg: 0x5A56E0 })

Test Configuration

MUST_ERROR