+ return (!basic1->base_type && !basic2->base_type);
+ }
+ else if(const ImageTypeDeclaration *image1 = dynamic_cast<const ImageTypeDeclaration *>(&type1))
+ {
+ const ImageTypeDeclaration *image2 = dynamic_cast<const ImageTypeDeclaration *>(&type2);
+ if(!image2)
+ return false;
+
+ if(image1->dimensions!=image2->dimensions || image1->array!=image2->array)
+ return false;
+ if(image1->sampled!=image2->sampled || image1->shadow!=image2->shadow)
+ return false;
+
+ if(image1->base_type && image2->base_type)
+ return is_same_type(*image1->base_type, *image2->base_type);
+ else
+ return (!image1->base_type && !image2->base_type);
+ }
+ else if(const StructDeclaration *strct1 = dynamic_cast<const StructDeclaration *>(&type1))
+ {
+ const StructDeclaration *strct2 = dynamic_cast<const StructDeclaration *>(&type2);
+ if(!strct2)
+ return false;
+
+ NodeList<Statement>::const_iterator i = strct1->members.body.begin();
+ NodeList<Statement>::const_iterator j = strct2->members.body.begin();
+ for(; (i!=strct1->members.body.end() && j!=strct2->members.body.end()); ++i, ++j)