green(reify): implement reify(.enum) — mint a flat enum from TypeInfo
REIFY Phase 0.2 (Phase 0 complete). Lowering.reifyType (lower/nominal.zig)
reads the flat-enum TypeInfo literal off the AST, synthesizes an
ast.EnumDecl, and feeds it through the SAME type_bridge.buildEnumInfo
path source enums use — so the minted type is byte-identical to a
hand-written `enum { value: i64; closed; }` and flows through enum
codegen (layout / construct / match) UNMODIFIED (Contract 2).
Wired at the `E :: reify(...)` const-decl hook in lower/decl.zig
(replacing the Phase-0.0 loud bail). Unsupported argument shapes bail
loudly via reifyBail — never a silent default. The generic.zig inline
reify path now reports it's only supported in a `::` binding (Phase 0).
examples/0614 green: reify a {value: i64, closed} enum, construct
.value(3) and .closed, match both -> "value 3" / "closed". Full suite
green (670 examples, 447 unit).
This commit is contained in:
@@ -1703,6 +1703,7 @@ pub const Lowering = struct {
|
||||
pub const registerErrorSetDecl = lower_nominal.registerErrorSetDecl;
|
||||
pub const registerStructDecl = lower_nominal.registerStructDecl;
|
||||
pub const registerEnumDecl = lower_nominal.registerEnumDecl;
|
||||
pub const reifyType = lower_nominal.reifyType;
|
||||
pub const registerUnionDecl = lower_nominal.registerUnionDecl;
|
||||
pub const qualifyAnonType = lower_nominal.qualifyAnonType;
|
||||
pub const nominalIdOf = lower_nominal.nominalIdOf;
|
||||
|
||||
Reference in New Issue
Block a user