diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-09 22:26:09 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-09 22:26:09 +0300 |
| commit | 0bee8234a52c9399544364e8d26b124cb487ce7c (patch) | |
| tree | e026b5482d740473c50055f4424eb87b362ddddc /src/scope.c | |
| parent | aa7ea13840e68abff8e9cf74376a6276f6a99033 (diff) | |
| download | ek-0bee8234a52c9399544364e8d26b124cb487ce7c.tar.gz ek-0bee8234a52c9399544364e8d26b124cb487ce7c.zip | |
fix trait expansion
+ Accidentally referenced an owned string, add strdup()
+ Didn't replace type IDs in ->t2
Diffstat (limited to 'src/scope.c')
| -rw-r--r-- | src/scope.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scope.c b/src/scope.c index c1ece2e..4316a40 100644 --- a/src/scope.c +++ b/src/scope.c @@ -137,7 +137,7 @@ struct visible *create_proc(struct scope *scope, char *id, struct ast *proc) int scope_add_var(struct scope *scope, struct ast *var) { - struct ast *exists = file_scope_find_symbol(scope, var_id(var)); + struct ast *exists = scope_find_symbol(scope, var_id(var)); if (exists) { semantic_error(scope->fctx, var, "var redefined"); semantic_info(scope->fctx, exists, "previously here"); |
