aboutsummaryrefslogtreecommitdiff
path: root/src/scope.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-01-11 00:52:21 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2025-01-11 00:52:21 +0200
commit2d8d5ffaee9701955828413f844afa1b3767f748 (patch)
tree0eab7acec6f06b3a4da61a8207dace8524810652 /src/scope.c
parent2d90cea9adb9a3f73cd5b211a4ed9508b505729f (diff)
downloadek-2d8d5ffaee9701955828413f844afa1b3767f748.tar.gz
ek-2d8d5ffaee9701955828413f844afa1b3767f748.zip
futher struct continuation work
Diffstat (limited to 'src/scope.c')
-rw-r--r--src/scope.c2
1 files changed, 1 insertions, 1 deletions
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");