ast_call: adopt the funciton's return type

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-18 19:37:51 +02:00
parent b7b0fcdc94
commit 40fe52e665

4
ast.c
View file

@ -533,6 +533,10 @@ ast_call* ast_call_new(lex_ctx ctx,
self->func = funcexpr;
self->expression.vtype = funcexpr->expression.next->expression.vtype;
if (funcexpr->expression.next->expression.next)
self->expression.next = ast_type_copy(ctx, funcexpr->expression.next->expression.next);
return self;
}
MEM_VEC_FUNCTIONS(ast_call, ast_expression*, params)