+ if(iface_block && var.interface==iface_block->interface)
+ var.interface.clear();
+}
+
+void TypeResolver::visit(InterfaceBlock &iface)
+{
+ if(iface.members)
+ {
+ SetForScope<InterfaceBlock *> set_iface(iface_block, &iface);
+ iface.members->visit(*this);
+
+ StructDeclaration *strct = new StructDeclaration;
+ strct->source = INTERNAL_SOURCE;
+ strct->name = format("_%s_%s", iface.interface, iface.name);
+ strct->members.body.splice(strct->members.body.begin(), iface.members->body);
+ stage->content.body.insert(type_insert_point, strct);
+ stage->types.insert(make_pair(strct->name, strct));
+
+ iface.members = 0;
+ strct->interface_block = &iface;
+ iface.struct_declaration = strct;
+ }
+
+ TypeDeclaration *type = iface.struct_declaration;
+ if(type && iface.array)
+ type = get_or_create_array_type(*type);
+ r_any_resolved = (type!=iface.type_declaration);
+ iface.type_declaration = type;