Fixing incorrectly solved generic module name collision bug.

This commit is contained in:
Christoffer Lerno
2024-09-04 21:51:03 +02:00
parent 7e47f4ed08
commit 5e4d790fc3

View File

@@ -215,12 +215,10 @@ static void register_generic_decls(CompilationUnit *unit, Decl **decls)
case DECL_BODYPARAM:
case DECL_GLOBALS:
UNREACHABLE
case DECL_MACRO:
case DECL_DEFINE:
case DECL_DISTINCT:
case DECL_ENUM:
case DECL_FAULT:
case DECL_FUNC:
case DECL_STRUCT:
case DECL_TYPEDEF:
case DECL_UNION:
@@ -228,9 +226,13 @@ static void register_generic_decls(CompilationUnit *unit, Decl **decls)
case DECL_BITSTRUCT:
case DECL_INTERFACE:
break;
case DECL_MACRO:
case DECL_FUNC:
if (decl->func_decl.type_parent) continue;
break;
}
htable_set(&unit->module->symbols, (void *)decl->name, decl);
if (decl->visibility == VISIBLE_PUBLIC && decl->decl_kind != DECL_MACRO)
if (decl->visibility == VISIBLE_PUBLIC)
{
global_context_add_generic_decl(decl);
}