From cf71caefc237f622cfd4a38761347ed256c984b0 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Fri, 25 Sep 2026 07:36:57 +0700 Subject: [PATCH] spec-memory.md cites the defer_ok field on the line it is declared --- spec-memory.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec-memory.md b/spec-memory.md index 578dcc11..1220f8f3 100644 --- a/spec-memory.md +++ b/spec-memory.md @@ -501,7 +501,7 @@ rejected: - **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 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 `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