bug fix
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user