|
|
@@ -251,4 +251,22 @@ Measured while scaffolding (branch `resolve-check`):
|
|
|
(`AST.SetTy`) for `Lower` to read. Designator nodes are the only
|
|
|
expressions whose parse-time type is `-1` (forward/undefined).
|
|
|
|
|
|
+- **2026-10-15 (`192ad55`, step 4b)** — the designator resolver exists:
|
|
|
+ `Check` resolves a *forward* designator's full type — the base symbol
|
|
|
+ (from the scope recorded at reference time) plus its selectors, via
|
|
|
+ `SelType` over `SymTab.FieldType`/`ArrayElem`/`PtrBase` — and stores
|
|
|
+ it on the node with `AST.SetTy`. `SymTab.FwdVarResolve` now also
|
|
|
+ returns the resolved type, and `Design` attaches the designator node
|
|
|
+ to the forward note. Verified with a temporary differential
|
|
|
+ instrument in `LowerDesign` (which computes the same type
|
|
|
+ independently): clean across the suite, and it fires (299) when the
|
|
|
+ resolver is deliberately broken. New regression test `t_fwdsel.mod`
|
|
|
+ (forward ref through an array-index selector). Suite 191/191;
|
|
|
+ fixpoint OK (3,474,750 bytes).
|
|
|
+- **Next**: forward designators are now typed, but an expression
|
|
|
+ *containing* one (e.g. `arr[0] + arr[1]`) is still typed `InvalidType`
|
|
|
+ at parse time — the walk must propagate the resolved types up the
|
|
|
+ tree and then take over the statement/expression checks. Only then
|
|
|
+ can `Design` stop deferring and `FwdVar*` go.
|
|
|
+
|
|
|
|