aboutsummaryrefslogtreecommitdiff
path: root/src/scope.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scope.c')
-rw-r--r--src/scope.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/scope.c b/src/scope.c
index b5729cd..48d3bc5 100644
--- a/src/scope.c
+++ b/src/scope.c
@@ -54,6 +54,8 @@ void destroy_scope(struct scope *scope)
}
destroy_visible(scope, scope->vars);
+ destroy_visible(scope, scope->procs);
+ destroy_visible(scope, scope->macros);
destroy_visible(scope, scope->types);
struct scope *prev = scope->children, *cur;
@@ -204,6 +206,7 @@ int scope_add_proc(struct scope *scope, struct ast_node *proc)
semantic_info(scope->fctx, exists, "previously here");
return -1;
}
+
/* always add to scope, do resolve checking later */
create_proc(scope, AST_PROC(proc).id, proc);
if (scope->parent &&