find references in while continue expressions (#758)
This commit is contained in:
parent
46da74d32e
commit
31584cff60
@ -202,6 +202,7 @@ fn symbolReferencesInternal(
|
||||
const loop = ast.whileAst(tree, node).?;
|
||||
try symbolReferencesInternal(builder, loop.ast.cond_expr, handle, false);
|
||||
try symbolReferencesInternal(builder, loop.ast.then_expr, handle, false);
|
||||
try symbolReferencesInternal(builder, loop.ast.cont_expr, handle, false);
|
||||
try symbolReferencesInternal(builder, loop.ast.else_expr, handle, false);
|
||||
},
|
||||
.@"if",
|
||||
|
@ -74,6 +74,15 @@ test "references - local scope" {
|
||||
);
|
||||
}
|
||||
|
||||
test "references - while continue expression" {
|
||||
try testReferences(
|
||||
\\ pub fn foo() void {
|
||||
\\ var <0>: u32 = 0;
|
||||
\\ while (true) : (<0> += 1) {}
|
||||
\\ }
|
||||
);
|
||||
}
|
||||
|
||||
test "references - label" {
|
||||
if (skip_references_tests) return error.SkipZigTest;
|
||||
try testReferences(
|
||||
|
Loading…
Reference in New Issue
Block a user