Bug 861857: TI: Fix testing the intersection between two types, r=jandem

This commit is contained in:
Hannes Verschore 2013-04-15 16:32:28 +02:00
parent e11c98aeeb
commit 4df953f91f

View File

@ -378,7 +378,7 @@ TypeSet::intersectionEmpty(TypeSet *other)
if (unknown() || other->unknown())
return false;
if (unknownObject() && unknownObject())
if (unknownObject() && other->unknownObject())
return false;
if (unknownObject() && other->getObjectCount() > 0)
@ -392,12 +392,14 @@ TypeSet::intersectionEmpty(TypeSet *other)
return false;
// Test if there are object that are in both TypeSets
for (unsigned i = 0; i < getObjectCount(); i++) {
TypeObjectKey *obj = getObject(i);
if (!obj)
continue;
if (other->hasType(Type::ObjectType(obj)))
return false;
if (!unknownObject()) {
for (unsigned i = 0; i < getObjectCount(); i++) {
TypeObjectKey *obj = getObject(i);
if (!obj)
continue;
if (other->hasType(Type::ObjectType(obj)))
return false;
}
}
return true;