xfail(reify): examples/0614-comptime-reify-enum — reify a flat enum

REIFY Phase 0.1. Add the end-to-end Phase-0 example: reify a flat enum
(value: i64, closed) from a TypeInfo literal, construct E.value(3) /
E.closed, and match both arms. Seed an empty expected/*.exit marker.

RED by design (reify still bails -> "unparseable expected exit"); the
next commit (0.2) implements reify and turns it green. Satisfies the
no-commit-both-adds-a-test-and-passes cadence.
This commit is contained in:
agra
2026-06-16 18:08:00 +03:00
parent 81669c72b7
commit 1bec54d0c4
3 changed files with 38 additions and 1 deletions

View File

@@ -4,7 +4,15 @@ Companion to [PLAN-REIFY.md](PLAN-REIFY.md). Update after every step (one step a
time, per the cadence rule).
## Last completed step
**Phase 0.0 (lock).** Added the comptime type-metaprogramming surface as the
**Phase 0.1 (xfail).** Added `examples/0614-comptime-reify-enum.sx` — reify a
flat enum (`value: i64`, `closed`) from a `TypeInfo` literal, construct
`E.value(3)` / `E.closed`, match both. Seeded an EMPTY
`expected/0614-…​.exit` marker → corpus is RED ("unparseable expected exit",
reify still bails). This is the deliberate xfail; **Phase 0.2 turns it green**
(per the no-commit-both-adds-and-passes cadence). `zig build test` is RED on
this commit by design (1 example fails); the very next commit makes it pass.
### (prior) Phase 0.0 (lock). Added the comptime type-metaprogramming surface as the
on-demand module `library/modules/std/meta.sx` (NOT the prelude — see decision
below): `EnumVariant`/`EnumInfo`/`TypeInfo` data types + bodyless `#builtin`
decls `reify` / `type_info` / `field_type`. Each builtin bails LOUDLY when