docs(metatype): refresh PLAN Status — surface complete, 0141 deferred

This commit is contained in:
agra
2026-06-17 08:08:56 +03:00
parent 0f88525884
commit 86feced560

View File

@@ -107,20 +107,31 @@ while red. Examples: `06xx` (comptime), `11xx` (diagnostics).
before the body lowers). `examples/0618` (recursive `*List`: construct, match
through the pointer, recursive traversal). Mutual recursion / by-value-self-ref
rejection fall out of the same mechanism (F5 adds the loud by-value check).
- [ ] **`make_enum(variants: []EnumVariant)`** sx helper over a COMPUTED
(non-literal) variant list — exercises the interpreter decoding a value-arg
slice in `define`.
- [x] **`type_info($T) -> TypeInfo`** (enum-only) — reflect an `enum`/`tagged_union`
INTO a value (inverse of `define`'s decode): `interp.zig:reflectTypeInfo`
constructs the `.enum(EnumInfo{ variants })` Value `defineEnum` decodes, so
`define(declare(n), type_info(T))` round-trips. `examples/0619`. Non-enum args
rejected loudly at lower time. **Still pending:** widen `TypeInfo` past
`` `enum `` (struct/tuple variants) + the matching `define` decode arms.
- [~] **Validation + loud diagnostics** — by-VALUE self-reference DONE
(`checkInfiniteSize` Pass 1g: loud "infinitely sized" diagnostic + cycle
break, covers source + comptime types; `examples/1178`, issue 0139 resolved).
Still pending: duplicate variant names, a `declare()` never `define()`d
(hard error), use-before-define.
- [x] **`make_enum(name, variants: []EnumVariant)`** — the general enum constructor
over a COMPUTED (value, non-literal) variant list. Pure sx in `meta.sx`;
exercises `define` decoding a value-arg slice. `examples/0620` (array-literal
local) / `0624` (generic builder).
- [x] **Comptime slice over a non-string aggregate**`arr[lo..hi]` over an array
yields a real slice value at comptime (`base_ty` threaded onto `Subslice`;
open-ended `hi` folded to the array's static length; `subsliceElements`).
`examples/0621`.
- [x] **`type_info($T) -> TypeInfo`** — reflect `enum`/`tagged_union`/`struct`/`tuple`
INTO a value (inverse of `define`'s decode); `define` decodes all three back
(`defineEnum`/`defineStruct`/`defineTuple`, dispatched on the TypeInfo tag).
Round-trips: `examples/0619` (enum) / `0622` (struct) / `0623` (tuple). The
reflect/construct triad is complete.
- [x] **Generic type-fn body locals** — a generic `($T) -> Type` comptime-evaluates
its FULL body (prelude statements + return), so a local before the return
resolves (`createComptimeFunctionWithPrelude` / `evalComptimeTypeBody`).
`examples/0624`.
- [x] **Validation + loud diagnostics** — by-value self-reference (`checkInfiniteSize`,
source `1178` + constructed `1182`; issue 0139), duplicate variant/field names
(`1180`), `declare()` never `define()`d (`1181`, was a `verifySizes` panic),
and the 0140 bail-surfacing (`1179`). use-before-define is subsumed by these
(no new check needed). Validation story COMPLETE.
- [ ] **Comptime `List` growth** (issue 0141, DEFERRED) — `List(T).append` at
comptime bails (two layers: null comptime allocator at scanDecls + `*T`
slot_ptr `struct_get`). Non-blocking; array-literal locals cover the use case.
## Risks / watch