diff options
| author | gingerBill <bill@gingerbill.org> | 2023-07-25 13:46:40 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-07-25 13:46:40 +0100 |
| commit | ab398f37042af66069e746f4f1bf5b214da1b371 (patch) | |
| tree | a7729db5d35150e14d824b4eb45ecb8910d13fa3 /src/tilde.cpp | |
| parent | baea6a1da88444db322f83b8300b5d64d117cfd1 (diff) | |
Implement `@(static)` local variables
Diffstat (limited to 'src/tilde.cpp')
| -rw-r--r-- | src/tilde.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tilde.cpp b/src/tilde.cpp index 9550374e8..a8c398a69 100644 --- a/src/tilde.cpp +++ b/src/tilde.cpp @@ -250,7 +250,9 @@ gb_internal TB_Symbol *cg_find_symbol_from_entity(cgModule *m, Entity *e) { String link_name = cg_get_entity_name(m, e); cgProcedure **proc_found = string_map_get(&m->procedures, link_name); if (proc_found) { - return (*proc_found)->symbol; + TB_Symbol *symbol = (*proc_found)->symbol; + map_set(&m->symbols, e, symbol); + return symbol; } GB_PANIC("could not find entity's symbol %.*s", LIT(e->token.string)); return nullptr; |