mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-09 14:22:18 -04:00
Fix the same $ procedure argument generating duplicate instantiations
This commit is contained in:
1 parent
13988d863a
commit
fc8b49f5f5
4 files changed
+22
-1
No files matched your search
+3
-1
@@ -2153,7 +2153,9 @@ gb_internal void add_entity_use(CheckerContext *c, Ast *identifier, Entity *enti
|
||||
if (identifier == nullptr || identifier->kind != Ast_Ident) {
|
||||
return;
|
||||
}
|
||||
entity->identifier.store(identifier);
|
||||
// NOTE: only set it once, as `$` procedure arguments are matched by this identifier
|
||||
Ast *empty_ident = nullptr;
|
||||
entity->identifier.compare_exchange_strong(empty_ident, identifier);
|
||||
|
||||
identifier->Ident.entity = entity;
|
||||
|
||||
|
||||
Reference in new issue
Block a user