spec-memory.md cites the defer_ok field on the line it is declared

This commit is contained in:
Joseph Ferano 2026-09-25 07:36:57 +07:00
parent cbd910c117
commit cf71caefc2

View File

@ -501,7 +501,7 @@ rejected:
- **Odin's `defer delete`** can be written only where its scope is the whole - **Odin's `defer delete`** can be written only where its scope is the whole
function. `defer` is function-scoped: it is accepted at the top level of a function. `defer` is function-scoped: it is accepted at the top level of a
function body and in a `let` that is itself at the top level, to any depth, function body and in a `let` that is itself at the top level, to any depth,
and refused in a branch or a loop body (`check.ml:477`, the `defer_ok` field, and refused in a branch or a loop body (`check.ml:495`, the `defer_ok` field,
and the `Ast.Defer` arm at `check.ml:3661`). So `(defer (free v))` for a and the `Ast.Defer` arm at `check.ml:3661`). So `(defer (free v))` for a
`let`-bound `v` works when that `let` is at the top level of the body, and `let`-bound `v` works when that `let` is at the top level of the body, and
runs at function exit rather than at the end of the `let`. There is no runs at function exit rather than at the end of the `let`. There is no