|
@@ -286,4 +286,24 @@ Measured while scaffolding (branch `resolve-check`):
|
|
|
divergence: a procedure value's type is `ClProc` at parse time but
|
|
divergence: a procedure value's type is `ClProc` at parse time but
|
|
|
`ClInvalid` in `Lower`.
|
|
`ClInvalid` in `Lower`.
|
|
|
|
|
|
|
|
|
|
+- **2026-10-15 (`8efae2e`, step 4d)** — the first check moves to the
|
|
|
|
|
+ walk: an assignment whose operand was a forward reference is now
|
|
|
|
|
+ type-checked *after* resolution. `PropNode` returns "touched by a
|
|
|
|
|
+ forward reference" (a forward designator node is marked `Op=1`; a node
|
|
|
|
|
+ `PropNode` re-types also counts), and `CheckAssign` re-checks such an
|
|
|
|
|
+ assignment (`Assignable` / class class). Previously `n := "abc"` with
|
|
|
|
|
+ a later `VAR n : INTEGER` was **silently accepted**. Non-forward
|
|
|
|
|
+ assignments keep the parser's check, so there are no duplicate
|
|
|
|
|
+ diagnostics and `-noresolve` still checks fully. New `expect_fail`
|
|
|
|
|
+ test `t_bad_fwd.mod`; suite 193/193.
|
|
|
|
|
+- **Pattern for the remaining checks**: the same shape — a check the
|
|
|
|
|
+ parser had to skip for a forward operand is re-run in `PropNode` for a
|
|
|
|
|
+ touched subtree (control-flow conditions, `RETURN`, arity, …).
|
|
|
|
|
+- **Architectural conclusion**: `FwdVar*`/`NoteForward` *cannot* be
|
|
|
|
|
+ deleted this way. Even with every check moved, `Design` must still
|
|
|
|
|
+ bind a not-yet-declared name — which needs the compiler to parse
|
|
|
|
|
+ declarations before bodies (a genuinely two-phase parse). The
|
|
|
|
|
+ resolve/check pass improves *diagnostics* for forward references and
|
|
|
|
|
+ gives the type layer; the deletion needs the parse restructure.
|
|
|
|
|
+
|
|
|
|
|
|