Generic methods were incorrectly registered as functions, leading to naming collisions. #1402

This commit is contained in:
Christoffer Lerno
2024-09-04 15:13:29 +02:00
parent 63fc77a861
commit 7e47f4ed08
3 changed files with 38 additions and 1 deletions

View File

@@ -230,7 +230,10 @@ static void register_generic_decls(CompilationUnit *unit, Decl **decls)
break;
}
htable_set(&unit->module->symbols, (void *)decl->name, decl);
if (decl->visibility == VISIBLE_PUBLIC) global_context_add_generic_decl(decl);
if (decl->visibility == VISIBLE_PUBLIC && decl->decl_kind != DECL_MACRO)
{
global_context_add_generic_decl(decl);
}
}
}