diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/analysis.odin | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin index 8956c70..b5cd385 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -1394,6 +1394,20 @@ internal_resolve_type_identifier :: proc( } } + for imp in ast_context.imports { + if strings.compare(imp.base, node.name) == 0 { + symbol := Symbol { + type = .Package, + pkg = imp.name, + value = SymbolPackageValue{}, + } + + try_build_package(symbol.pkg) + + return symbol, true + } + } + if local, ok := get_local(ast_context^, node); ok && ast_context.use_locals { is_distinct := false @@ -1706,20 +1720,6 @@ internal_resolve_type_identifier :: proc( } } - for imp in ast_context.imports { - if strings.compare(imp.base, node.name) == 0 { - symbol := Symbol { - type = .Package, - pkg = imp.name, - value = SymbolPackageValue{}, - } - - try_build_package(symbol.pkg) - - return symbol, true - } - } - for built in indexer.builtin_packages { if symbol, ok := lookup(node.name, built); ok { return resolve_symbol_return(ast_context, symbol) |