aboutsummaryrefslogtreecommitdiff
path: root/src/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast.c')
-rw-r--r--src/ast.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ast.c b/src/ast.c
index 8e102ee..0008785 100644
--- a/src/ast.c
+++ b/src/ast.c
@@ -743,6 +743,14 @@ static void funccall_resolve(Ast *self, AstCompilerContext *context) {
throw(AST_ERR);
}
+ {
+ FunctionSignature *func_sig = self->resolve_data.type.value.func_sig;
+ FunctionReturnType *return_type = buffer_begin(&func_sig->return_types);
+ assert(buffer_get_size(&func_sig->return_types, FunctionReturnType) == 1);
+ self->resolve_data.type.type = RESOLVED_TYPE_LHS_EXPR;
+ self->resolve_data.type = return_type->resolved_type;
+ }
+
ast = buffer_begin(&func_call->args);
ast_end = buffer_end(&func_call->args);
for(; ast != ast_end; ++ast) {