From 2188448b1954b71568a25834227c07516e3e06e5 Mon Sep 17 00:00:00 2001 From: Mid <> Date: Thu, 2 Oct 2025 13:44:35 +0300 Subject: [PATCH] Implicitly cast return type --- src/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse.c b/src/parse.c index 2f37a5e..5e9eb5e 100644 --- a/src/parse.c +++ b/src/parse.c @@ -1166,7 +1166,7 @@ static void nct_parse_statement(Parser *P) { ret->next = NULL; if(!maybe(P, TOKEN_SEMICOLON)) { - ret->val = nct_parse_expression(P, 0); + ret->val = ast_cast_expr(nct_parse_expression(P, 0), P->topLevel->functionType->function.ret); expect(P, TOKEN_SEMICOLON); }