From af83cb4f4e26bb30bef65065bb6a0a15b5150dce Mon Sep 17 00:00:00 2001 From: servostar Date: Tue, 8 Oct 2024 12:03:01 +0200 Subject: [PATCH] fix: removed root module name --- src/compiler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler.c b/src/compiler.c index 60db30c..5ee9bc6 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -240,10 +240,10 @@ static int compile_module_with_dependencies(ModuleFileStack* unit, if (NULL == module_ref) { module_ref = mem_alloc(MemoryNamespaceOpt, sizeof(ModuleRef)); module_ref->module_path = mem_new_g_array(MemoryNamespaceOpt, sizeof(char*)); + } else { + module_ref_push(module_ref, module_from_basename(file->path)); } - module_ref_push(module_ref, module_from_basename(file->path)); - GHashTable* imports = mem_new_g_hash_table(MemoryNamespaceAst, g_str_hash, g_str_equal);