// Diagnostic: a layout-welded struct whose sx declaration does NOT faithfully // mirror the compiler's real Zig type is a build error — the sx side is a header // checked against the implementation, not a free reinterpretation. // // `Field` is two u32s (`name`, `ty`) in the compiler library; declaring it with a // single field must be rejected at registration with a clear field-count message. #import "modules/std.sx"; compiler :: #library "compiler"; Field :: struct abi(.zig) extern compiler { name: u32; } main :: () { f := Field.{ name = 1 }; print("{}\n", f.name); }