diff --git a/checker.c b/checker.c index 791679b..eb0deb0 100644 --- a/checker.c +++ b/checker.c @@ -238,6 +238,7 @@ void checker_check_assign(Checker* checker, SymbolTable* table, ASTNode* node) void checker_check_let(Checker* checker, SymbolTable* table, ASTNode* node) { + checker_check_expr(checker, table, node->let_node.value); Symbol* found = symbol_table_resolve_local(table, node->let_node.id->id_value); if (found != NULL) { @@ -245,7 +246,6 @@ void checker_check_let(Checker* checker, SymbolTable* table, ASTNode* node) print_error("checker: redefinition", node->pos); return; } - checker_check_expr(checker, table, node->let_node.value); } void checker_check_fn(Checker* checker, SymbolTable* table, ASTNode* node) { }