clear using_trail when calling resolveUse

fixes #1231
This commit is contained in:
Techatrix
2023-06-09 23:13:36 +02:00
parent 1020817ed0
commit 77e39a8da8
2 changed files with 17 additions and 0 deletions

View File

@@ -2390,6 +2390,7 @@ pub fn innermostContainer(handle: *const DocumentStore.Handle, source_index: usi
}
fn resolveUse(analyser: *Analyser, uses: []const Ast.Node.Index, symbol: []const u8, handle: *const DocumentStore.Handle) error{OutOfMemory}!?DeclWithHandle {
analyser.using_trail.clearRetainingCapacity();
for (uses) |index| {
const gop = try analyser.using_trail.getOrPut(analyser.gpa, index);
if (gop.found_existing) continue;