From b417e64e1017b9b682df66929b9f8557bc38c7ab Mon Sep 17 00:00:00 2001 From: Alexandros Naskos Date: Mon, 29 Mar 2021 15:41:58 +0300 Subject: [PATCH] Do not show tests in container completions --- src/analysis.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/analysis.zig b/src/analysis.zig index 2fb3869..b060848 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -2702,14 +2702,14 @@ fn makeScopeInternal( ); const name = getDeclName(tree, decl) orelse continue; - if (try scopes.items[scope_idx].decls.fetchPut(name, .{ .ast_node = decl })) |existing| { - // TODO Record a redefinition error. - } - if (tags[decl] == .test_decl) { try tests.append(allocator, decl); continue; } + if (try scopes.items[scope_idx].decls.fetchPut(name, .{ .ast_node = decl })) |existing| { + // TODO Record a redefinition error. + } + if (!can_have_enum_completions) continue;