Skip to content

Commit

Permalink
Update typecheck.c
Browse files Browse the repository at this point in the history
  • Loading branch information
littlewhitecloud authored Dec 17, 2023
1 parent eef664f commit ae93ec5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/typecheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ static Signature handle_signature(FileTypes *ft, const AstSignature *astsig, con
else
sig.returntype = type_from_ast(ft, &astsig->returntype);

// TODO: validate main() parameters
// TODO: test main() taking parameters
if (!self_type && !strcmp(sig.name, "main") && sig.returntype != intType) {
fail_with_error(astsig->returntype.location, "the main() function must return int");
}
Expand Down

0 comments on commit ae93ec5

Please sign in to comment.