From 90571a6151641e6bbdb854438b530146fd1d8bca Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 28 Oct 2012 20:02:57 +0100 Subject: [PATCH] ast_store needs to take over the type of its destination --- ast.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ast.c b/ast.c index a0af130..2350e20 100644 --- a/ast.c +++ b/ast.c @@ -616,6 +616,17 @@ ast_store* ast_store_new(lex_ctx ctx, int op, self->dest = dest; self->source = source; + self->expression.vtype = dest->expression.vtype; + if (dest->expression.next) { + self->expression.next = ast_type_copy(ctx, dest); + if (!self->expression.next) { + ast_delete(self); + return NULL; + } + } + else + self->expression.next = NULL; + return self; } -- 2.39.5