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:
@@ -0,0 +1 @@
|
||||
0
|
||||
|
||||
1
examples/expected/0614-comptime-reify-enum.stderr
Normal file
1
examples/expected/0614-comptime-reify-enum.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
2
examples/expected/0614-comptime-reify-enum.stdout
Normal file
2
examples/expected/0614-comptime-reify-enum.stdout
Normal file
@@ -0,0 +1,2 @@
|
||||
value 3
|
||||
closed
|
||||
Reference in New Issue
Block a user