diff --git a/specs.md b/specs.md index 3c3ded9..2f6396c 100644 --- a/specs.md +++ b/specs.md @@ -2257,6 +2257,12 @@ A variable declaration (`name :=`) inside an inner scope shadows any variable wi // prints: first, then second ``` +`break` and `continue` exit the loop body's scope: the iteration's pending +defers run (LIFO, including entries from nested blocks between the loop and +the jump) before control transfers — exactly as on the fall-through end of an +iteration. `return` runs all pending defers of the function. A `break` or +`continue` outside a loop is a compile-time error. + --- ## 7. Built-in Functions