diff options
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) { |
