]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
ast_call: adopt the funciton's return type
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 18 Aug 2012 17:37:51 +0000 (19:37 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 18 Aug 2012 17:37:51 +0000 (19:37 +0200)
ast.c

diff --git a/ast.c b/ast.c
index 89ae7accf531dceb42c68e37ac3bb955b962e045..c3dfe21a281acff9561fb1addd31e9e14cd0bd9d 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -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)