diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2023-12-14 21:37:53 +0100 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2023-12-14 21:37:53 +0100 |
| commit | e2267c9dda731b1cb1b43e01bf7b2b776f3e8e8a (patch) | |
| tree | 83834ffc110af3c37b91c7161d6f0d6573a09bf3 /src/server | |
| parent | 2b0e80984747096b3b15026c47470481896ccdca (diff) | |
Fix issue with not using builtin symbols when in another package.
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/analysis.odin | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin index d375911..9430118 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -1905,16 +1905,13 @@ internal_resolve_type_identifier :: proc( } } - //If we are resolving a symbol that is in the document package, then we'll check the builtin packages. - if ast_context.current_package == ast_context.document_package { - if symbol, ok := lookup(node.name, "$builtin"); ok { + if symbol, ok := lookup(node.name, "$builtin"); ok { + return resolve_symbol_return(ast_context, symbol) + } + for built in indexer.builtin_packages { + if symbol, ok := lookup(node.name, built); ok { return resolve_symbol_return(ast_context, symbol) } - for built in indexer.builtin_packages { - if symbol, ok := lookup(node.name, built); ok { - return resolve_symbol_return(ast_context, symbol) - } - } } for u in ast_context.usings { |