From 5887afae626a79af9d12925d3061834a12dc9c81 Mon Sep 17 00:00:00 2001
From: Wolfgang Bumiller <blub@speed.at>
Date: Sat, 12 Jan 2013 15:15:58 +0100
Subject: [PATCH] copying the output type on ast_array_index_codegen

---
 ast.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ast.c b/ast.c
index ddbffb9..dbb2012 100644
--- a/ast.c
+++ b/ast.c
@@ -2253,6 +2253,8 @@ bool ast_array_index_codegen(ast_array_index *self, ast_function *func, bool lva
 
         *out = ir_call_value(call);
         self->expression.outr = *out;
+        (*out)->vtype = self->expression.vtype;
+        codegen_output_type(self, *out);
         return true;
     }
 
@@ -2278,6 +2280,8 @@ bool ast_array_index_codegen(ast_array_index *self, ast_function *func, bool lva
         compile_error(ast_ctx(self), "array indexing here needs an integer constant");
         return false;
     }
+    (*out)->vtype = self->expression.vtype;
+    codegen_output_type(self, *out);
     return true;
 }
 
-- 
2.39.5