This commit is contained in:
2026-08-01 13:10:36 +02:00
parent a8593c00f9
commit 304880a9aa
8 changed files with 1873350 additions and 998499 deletions
+1 -1
View File
@@ -11570,7 +11570,7 @@ build_block :: proc(
item_local := append_build_local(ctx, statement.name, capture_type, false, statement.span)
index_local := hir.INVALID_LOCAL
if symbol.is_valid(statement.index_name) {
if statement.index_name == statement.name {
if statement.index_name == statement.name && statement.name != checker.sink_symbol {
diagnostic = source.add(checker.diagnostics, statement.span, "for-loop captures must have distinct names")
valid_loop = false
} else if id := add_shadow_diagnostic(