diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-09-17 22:05:40 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | dcd26bcfcc691f24508a7b6bf04c15042a4668ea (patch) | |
tree | f47df3dc79a5ac0b89507890d25843e9c724161b /src/ast.c | |
parent | b095aedd386e076d1f5a56b7384b836e653387d1 (diff) |
Fix function call resolved type
Diffstat (limited to 'src/ast.c')
-rw-r--r-- | src/ast.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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) { |