diff options
| author | Carson Fleming <cflems@cflems.net> | 2026-07-17 04:37:37 -0400 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2026-07-17 04:53:31 -0400 |
| commit | 99af8891f6672493939bf3b43084082884e28d04 (patch) | |
| tree | b1f94d8b78b96e0258bef9133ffa9c8faeb2e2b7 /type_checker.c | |
| parent | 82cf7004e351c9003af3019b2f7434ed8eeabf3e (diff) | |
| download | ccc-99af8891f6672493939bf3b43084082884e28d04.tar.gz | |
fix scope thing
Diffstat (limited to 'type_checker.c')
| -rw-r--r-- | type_checker.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) { |
