Correct -use-separate-module behaviour

This commit is contained in:
gingerBill
2024-07-08 15:13:40 +01:00
parent 8491e2491c
commit 2a219fa830
5 changed files with 16 additions and 6 deletions

View File

@@ -338,6 +338,9 @@ gb_internal Entity *alloc_entity(EntityKind kind, Scope *scope, Token token, Typ
entity->token = token;
entity->type = type;
entity->id = 1 + global_entity_id.fetch_add(1);
if (token.pos.file_id) {
entity->file = thread_safe_get_ast_file_from_id(token.pos.file_id);
}
return entity;
}