From 0bee8234a52c9399544364e8d26b124cb487ce7c Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 9 Aug 2024 22:26:09 +0300 Subject: fix trait expansion + Accidentally referenced an owned string, add strdup() + Didn't replace type IDs in ->t2 --- src/scope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/scope.c') 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"); -- cgit v1.3