From 2d8d5ffaee9701955828413f844afa1b3767f748 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 11 Jan 2025 00:52:21 +0200 Subject: futher struct continuation work --- 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 448c883..198e2c0 100644 --- a/src/scope.c +++ b/src/scope.c @@ -185,7 +185,7 @@ int scope_add_var(struct scope *scope, struct ast *var) int scope_add_type(struct scope *scope, char *id, struct ast *type) { - struct ast *exists = file_scope_find_type(scope, id); + struct ast *exists = scope_find_type(scope, id); if (exists) { semantic_error(scope->fctx, type, "type redefined"); semantic_info(scope->fctx, exists, "previously here"); -- cgit v1.3