summaryrefslogtreecommitdiff
path: root/type_checker.c
diff options
context:
space:
mode:
Diffstat (limited to 'type_checker.c')
-rw-r--r--type_checker.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/type_checker.c b/type_checker.c
index 0aaa584..00f57d0 100644
--- a/type_checker.c
+++ b/type_checker.c
@@ -281,6 +281,8 @@ static void type_check_group(struct group_node* node) {
exit_scope(node->scope);
}
+/* TODO: type check redefinition arguments against each other */
+/* TODO: wire the body to the definition either here or in the parser */
static void type_check_fn_decl(struct fn_decl_node* node) {
enter_scope(node->scope);
@@ -289,7 +291,7 @@ static void type_check_fn_decl(struct fn_decl_node* node) {
arg_decl = arg_decl->next)
arg_decl->def_ref->type = &arg_decl->type;
- type_check_group(&node->body);
+ if (node->body != NULL) type_check_group(node->body);
exit_scope(node->scope);
}