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:
@@ -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
|
||||
For(node->exprs){
|
||||
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);
|
||||
}
|
||||
|
||||
node->exprs = items.tight_copy(pctx->perm);
|
||||
node->resolved_type = name.type->func.ret;
|
||||
|
||||
|
||||
return operand_rvalue(name.type->func.ret);
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user