green(reify): type-fn over reify memoizes by mangled name (identity)
REIFY Phase 1.1 (Phase 1 complete). instantiateTypeFunction detects a type-fn body that returns reify(...) (findReturnReifyCall) and routes it to reifyType under the instantiation's name — mangled for inline use, the alias name for `Foo :: Box(i64)` — with the type-arg bindings active so reify payloads (`payload = T`) resolve against the instantiation args. Placed before the general case, whose resolveTypeWithBindings would route the reify call to the inline-position loud bail. Registering under the mangled name lets the top-of-instantiation cache return the SAME TypeId on a second instantiation, so Box(i64) resolved at two independent sites is ONE type (Contract 1). examples/0615 green (build()->consume() cross-site + `b : Box(i64) = .none`). Suite green (671 examples, 447 unit).
This commit is contained in:
@@ -128,7 +128,8 @@ Examples: `06xx` (comptime, deterministic), `11xx` (diagnostics for loud failure
|
||||
|
||||
- [x] Phase 0 — `reify` flat enum (`reify(.enum(...))` mints a flat enum via the
|
||||
shared `buildEnumInfo` path; `examples/0614` green; Contract 2 confirmed)
|
||||
- [ ] Phase 1 — type-fn identity
|
||||
- [x] Phase 1 — type-fn identity (`Box :: ($T)->Type { reify(...) }` memoizes by
|
||||
mangled name; `Box(i64)` at two sites is one type; `examples/0615` green)
|
||||
- [ ] Phase 2 — `type_info` + `field_type`
|
||||
- [ ] Phase 3 — `make_enum` + `RecvResult`/`TryResult`
|
||||
- [ ] Phase 4 — reference self-reference
|
||||
|
||||
Reference in New Issue
Block a user