Implicitly cast return type
This commit is contained in:
parent
d46b104d5c
commit
2188448b19
@ -1166,7 +1166,7 @@ static void nct_parse_statement(Parser *P) {
|
|||||||
ret->next = NULL;
|
ret->next = NULL;
|
||||||
|
|
||||||
if(!maybe(P, TOKEN_SEMICOLON)) {
|
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);
|
expect(P, TOKEN_SEMICOLON);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user