From d7a5a75511926bfc7722683777668be2c649c248 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Wed, 23 Jul 2025 12:01:38 +0100 Subject: [PATCH] static foreach is not the same as foreach for sequences Fixes #4267. --- spec/statement.dd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/statement.dd b/spec/statement.dd index 8df3290e3d..20514c6343 100644 --- a/spec/statement.dd +++ b/spec/statement.dd @@ -1101,8 +1101,8 @@ $(P If the aggregate expression is a $(DDSUBLINK spec/template, variadic-templates, sequence), the loop body is statically expanded once for each element. This is - the same as $(DDSUBLINK spec/version, staticforeach, Static Foreach) - on a sequence. + similar to a $(DDSUBLINK spec/version, staticforeach, *StaticForeachStatement*) + on a sequence, though there is a separate scope for each expansion. ) $(P There can be one or two iteration symbols declared. If one, then the symbol