From 99af8891f6672493939bf3b43084082884e28d04 Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Fri, 17 Jul 2026 04:37:37 -0400 Subject: fix scope thing --- type_checker.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'type_checker.c') diff --git a/type_checker.c b/type_checker.c index f914c34..d1a6c32 100644 --- a/type_checker.c +++ b/type_checker.c @@ -48,11 +48,14 @@ static void type_check_group(struct group_node* node) { type_check_stmt(stmt); stmt = stmt->next; } + scope = scope->next_out; } static void type_check_fn_decl(struct fn_decl_node* node) { + if (node->scope->next_out != scope) TYPE_PANIC("scopes are borked"); scope = node->scope; type_check_group(&node->body); + scope = scope->next_out; } static void type_check_root(struct root_node* node) { -- cgit v1.2.3