docs(metatype): issue 0139 resolved; by-value self-ref rejection done
This commit is contained in:
@@ -55,21 +55,21 @@ Pick any (independent):
|
|||||||
`define`'s decode); widen `TypeInfo` past `` `enum `` + construct a
|
`define`'s decode); widen `TypeInfo` past `` `enum `` + construct a
|
||||||
`[]EnumVariant` value in the interp. Bails loudly today in
|
`[]EnumVariant` value in the interp. Bails loudly today in
|
||||||
`call.zig:tryLowerReflectionCall`. Its own focused effort.
|
`call.zig:tryLowerReflectionCall`. Its own focused effort.
|
||||||
- **Validation + loud diagnostics** — duplicate variant names, by-VALUE
|
- **Validation + loud diagnostics** (remaining) — duplicate variant names, a
|
||||||
self-reference (`payload = List` not `*List` → infinite size), a `declare()`
|
`declare()` never `define()`d (hard error), use-before-define. (By-value
|
||||||
never `define()`d (hard error), use-before-define.
|
self-reference already rejected — issue 0139.)
|
||||||
|
|
||||||
## Known issues
|
## Known issues
|
||||||
- **issue 0139 — by-value self-reference segfaults** (`typeSizeBytes` infinite
|
None. (issue 0139 — by-value self-reference segfault — RESOLVED: `checkInfiniteSize`
|
||||||
recursion). A by-VALUE self-referential type (`payload = List` instead of
|
Pass 1g emits a loud "infinitely sized" diagnostic + breaks the cycle; covers
|
||||||
`*List`) stack-overflows instead of emitting a loud "infinite size" diagnostic.
|
source + comptime types; `examples/1178` locks it.)
|
||||||
PRE-EXISTING (a hand-written source enum `enum { node: Bad; leaf }` crashes
|
|
||||||
identically) — a general type-system gap, not specific to declare/define. Closes
|
|
||||||
the F5 "by-VALUE self-reference rejected" item for the comptime path once fixed.
|
|
||||||
Filed `issues/0139-byvalue-self-reference-segfault.md`; session stopped here per
|
|
||||||
the CLAUDE.md IMPASSABLE rule (do not work around / roll forward after filing).
|
|
||||||
|
|
||||||
## Log
|
## Log
|
||||||
|
- **By-value self-reference rejected (issue 0139, F5 partial).** New
|
||||||
|
`checkInfiniteSize` pass (Pass 1g) detects by-VALUE containment cycles (source +
|
||||||
|
comptime types, direct + mutual), emits a loud "infinitely sized" diagnostic,
|
||||||
|
and breaks the cycle (was a `typeSizeBytes` stack-overflow segfault). `*Self`
|
||||||
|
(pointer) stays valid. `examples/1178` locks the message. Suite green (675).
|
||||||
- **Self-reference done.** `declare(name)` + `preregisterForwardTypes` (forward
|
- **Self-reference done.** `declare(name)` + `preregisterForwardTypes` (forward
|
||||||
type + alias before body lowers) → `*Name` resolves; recursive `*List` enum
|
type + alias before body lowers) → `*Name` resolves; recursive `*List` enum
|
||||||
constructs, matches through the pointer, and traverses recursively. `0618` locks
|
constructs, matches through the pointer, and traverses recursively. `0618` locks
|
||||||
|
|||||||
@@ -113,10 +113,11 @@ while red. Examples: `06xx` (comptime), `11xx` (diagnostics).
|
|||||||
`define`'s decode): widen `TypeInfo` past `` `enum `` (struct/tuple) AND
|
`define`'s decode): widen `TypeInfo` past `` `enum `` (struct/tuple) AND
|
||||||
construct a `[]EnumVariant`-style value in the interpreter. Bails loudly today
|
construct a `[]EnumVariant`-style value in the interpreter. Bails loudly today
|
||||||
in `call.zig:tryLowerReflectionCall`. Round-trips through `define` once it lands.
|
in `call.zig:tryLowerReflectionCall`. Round-trips through `define` once it lands.
|
||||||
- [ ] **Validation + loud diagnostics** — duplicate variant names, by-VALUE
|
- [~] **Validation + loud diagnostics** — by-VALUE self-reference DONE
|
||||||
self-reference (`payload = List` not `*List` → infinite size), a `declare()`
|
(`checkInfiniteSize` Pass 1g: loud "infinitely sized" diagnostic + cycle
|
||||||
never `define()`d (hard error), use-before-define. Emit at the
|
break, covers source + comptime types; `examples/1178`, issue 0139 resolved).
|
||||||
`intern`/`internNominal` choke point; never a broken type.
|
Still pending: duplicate variant names, a `declare()` never `define()`d
|
||||||
|
(hard error), use-before-define.
|
||||||
|
|
||||||
## Risks / watch
|
## Risks / watch
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user