From b3a9c4e8d9c69c36cc29ba9cf477048ff58903f5 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Fri, 30 Nov 2012 20:33:40 +0100 Subject: [PATCH] Use the field parameter type on the raw paramter type list for their sizes. --- ast.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ast.c b/ast.c index 063084f..390faf7 100644 --- a/ast.c +++ b/ast.c @@ -1416,7 +1416,10 @@ bool ast_function_codegen(ast_function *self, ir_builder *ir) ec = &self->vtype->expression; for (i = 0; i < vec_size(ec->params); ++i) { - vec_push(irf->params, ec->params[i]->expression.vtype); + if (ec->params[i]->expression.vtype == TYPE_FIELD) + vec_push(irf->params, ec->params[i]->expression.next->expression.vtype); + else + vec_push(irf->params, ec->params[i]->expression.vtype); if (!self->builtin) { if (!ast_local_codegen(ec->params[i], self->ir_func, true)) return false; -- 2.39.2