Fix issue in is_autoimport ordering.

This commit is contained in:
Christoffer Lerno
2023-09-05 19:45:42 +02:00
parent cfe5c649c5
commit 69418ba44d
3 changed files with 10 additions and 6 deletions

View File

@@ -319,7 +319,15 @@ static Decl *sema_find_decl_in_global_new(CompilationUnit *unit, DeclTable *tabl
maybe_decl = candidate;
continue;
}
if (!ambiguous)
if (ambiguous)
{
if (candidate->is_autoimport && !decl->is_autoimport)
{
ambiguous = NULL;
decl = candidate;
}
}
else
{
ambiguous = decl;
decl = candidate;

View File

@@ -317,10 +317,6 @@ void sema_process_includes(CompilationUnit *unit)
void sema_analysis_pass_register_global_declarations(Module *module)
{
DEBUG_LOG("Pass: Register globals for module '%s'.", module->name->module);
if (str_eq("std::core::env", module->name->module))
{
printf("");
}
VECEACH(module->units, index)
{
CompilationUnit *unit = module->units[index];

View File

@@ -1 +1 @@
#define COMPILER_VERSION "0.4.633"
#define COMPILER_VERSION "0.4.634"