]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.c
function in the ast now MUST have an output type in their 'next' ast_expression point...
[xonotic/gmqcc.git] / ast.c
diff --git a/ast.c b/ast.c
index 0b6243dcf508f7a14154192b3bb235eb2783a2c9..065dfd88dbf2d4fb80dd09c8c70caaa66475cfa7 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -493,7 +493,7 @@ bool ast_global_codegen(ast_value *self, ir_builder *ir)
     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;