aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2026-02-12 15:15:46 +1100
committerGitHub <noreply@github.com>2026-02-12 15:15:46 +1100
commit6f33789343f66b8f239de1266242c5487ab2ac03 (patch)
tree8887736ced99ba5c39f75b22448f966e2a6e74cf /src
parent4f309f96acc53f788dabf7a9d0cb7319dbe16ebd (diff)
parentee32288b28a939bd500143589800217f844031cb (diff)
Merge pull request #1296 from BradLewis/fix/unused-imports-when-stmt
Resolve decls in when statements to fix incorrectly flagging imports as unused
Diffstat (limited to 'src')
-rw-r--r--src/server/file_resolve.odin8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/server/file_resolve.odin b/src/server/file_resolve.odin
index f381aac..c4b2467 100644
--- a/src/server/file_resolve.odin
+++ b/src/server/file_resolve.odin
@@ -51,10 +51,6 @@ resolve_ranged_file :: proc(
margin := 20
for decl in document.ast.decls {
- if _, is_value := decl.derived.(^ast.Value_Decl); !is_value {
- continue
- }
-
//Look for declarations that overlap with range
if range.start.line - margin <= decl.end.line && decl.pos.line <= range.end.line + margin {
resolve_decl(&position_context, &ast_context, document, decl, &symbols, .None, allocator)
@@ -88,10 +84,6 @@ resolve_entire_file :: proc(
symbols := make(map[uintptr]SymbolAndNode, 10000, allocator)
for decl in document.ast.decls {
- if _, is_value := decl.derived.(^ast.Value_Decl); !is_value {
- continue
- }
-
resolve_decl(&position_context, &ast_context, document, decl, &symbols, flag, allocator)
clear(&ast_context.locals)
}