Fix bug where you could pass arbitrary number of arguments, bug was

due probably to forgetting how the algorithm worked and so very trivial
ordering of statements was wrong.
This commit is contained in:
Krzosa Karol
2022-09-27 22:56:07 +02:00
parent f388e3f915
commit cd7e4fff32

View File

@@ -1353,9 +1353,6 @@ resolve_expr(Ast_Expr *ast, Resolve_Flag flags, Ast_Type *compound_context){
} }
node->exprs = items.tight_copy(pctx->perm);
node->resolved_type = name.type->func.ret;
// @note: check if all arguments are included and cleanup // @note: check if all arguments are included and cleanup
For(node->exprs){ For(node->exprs){
if(!is_flag_set(it->call_flags, CALL_INCLUDED)) if(!is_flag_set(it->call_flags, CALL_INCLUDED))
@@ -1363,6 +1360,9 @@ resolve_expr(Ast_Expr *ast, Resolve_Flag flags, Ast_Type *compound_context){
else unset_flag(it->call_flags, CALL_INCLUDED); else unset_flag(it->call_flags, CALL_INCLUDED);
} }
node->exprs = items.tight_copy(pctx->perm);
node->resolved_type = name.type->func.ret;
return operand_rvalue(name.type->func.ret); return operand_rvalue(name.type->func.ret);
// //