+ TypeDeclaration *type = resolve_type(var.type);
+ if(var.array && type)
+ {
+ map<TypeDeclaration *, TypeDeclaration *>::iterator i = array_types.find(type);
+ if(i==array_types.end())
+ {
+ BasicTypeDeclaration *array = new BasicTypeDeclaration;
+ array->source = BUILTIN_SOURCE;
+ array->name = type->name+"[]";
+ array->kind = BasicTypeDeclaration::ARRAY;
+ array->base = type->name;
+ array->base_type = type;
+ stage->content.body.insert(type_insert_point, array);
+ array->visit(*this);
+ type = array;
+ }
+ else
+ type = i->second;
+ }
+ var.type_declaration = type;