diff options
Diffstat (limited to 'src/scope.c')
| -rw-r--r-- | src/scope.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/scope.c b/src/scope.c index e49b828..251edef 100644 --- a/src/scope.c +++ b/src/scope.c @@ -71,7 +71,9 @@ void destroy_scope(struct scope *scope) int scope_add_symbol(struct scope *scope, struct ast *symbol) { assert(symbol->k == AST_VAR_DEF || symbol->k == AST_PROC_DEF); - struct ast **exists = visible_insert(&scope->symbols, symbol->s, symbol); + struct ast **exists = visible_insert(&scope->symbols, symbol->s, + symbol + ); if (!exists) { internal_error("failed inserting symbol into scope"); return -1; @@ -187,7 +189,9 @@ struct ast *file_scope_find_trait(struct scope *scope, char *id) int scope_add_template(struct scope *scope, struct ast *template) { - struct ast **exists = visible_insert(&scope->templates, template->s, template); + struct ast **exists = visible_insert(&scope->templates, template->s, + template + ); if (!exists) { internal_error("failed inserting template into scope"); return -1; |
