ir_value *v = NULL;
if (self->isconst && self->expression.vtype == TYPE_FUNCTION)
{
- ir_function *func = ir_builder_create_function(ir, self->name);
+ ir_function *func = ir_builder_create_function(ir, self->name, self->expression.next->expression.vtype);
if (!func)
return false;
goto error;
}
- callinstr = ir_block_create_call(func->curblock, ast_function_label(func, "call"), funval, funval->outtype);
+ callinstr = ir_block_create_call(func->curblock, ast_function_label(func, "call"), funval);
if (!callinstr)
goto error;