diff --git a/src/index_notation/index_notation.cpp b/src/index_notation/index_notation.cpp index a412e769a..1e462e47a 100644 --- a/src/index_notation/index_notation.cpp +++ b/src/index_notation/index_notation.cpp @@ -189,11 +189,20 @@ struct Isomorphic : public IndexNotationVisitorStrict { } } if (anode->isAccessingStructure != bnode->isAccessingStructure || - anode->windowedModes != bnode->windowedModes || - anode->indexSetModes != bnode->indexSetModes) { + anode->windowedModes != bnode->windowedModes) { + eq = false; + return; + } + if (anode->indexSetModes.size() != bnode->indexSetModes.size()) { eq = false; return; } + for (auto aset = anode->indexSetModes.begin(), bset = bnode->indexSetModes.begin(); aset != anode->indexSetModes.end(); ++aset, ++bset) { + if (aset->first != bset->first || *aset->second.set != *bset->second.set) { + eq = false; + return; + } + } eq = true; }