Implement equality comparison for associative arrays. The semantics aren't in

the spec, but DMD does a simple pointer comparison. Complaints about this go to
http://d.puremagic.com/issues/show_bug.cgi?id=1429 :P.
This commit is contained in:
Frits van Bommel
2009-06-21 00:12:29 +02:00
parent c261c03752
commit 62dee01d35

View File

@@ -1448,7 +1448,7 @@ DValue* EqualExp::toElem(IRState* p)
// the Tclass catches interface comparisons, regular
// class equality should be rewritten as a.opEquals(b) by this time
if (t->isintegral() || t->ty == Tpointer || t->ty == Tclass)
if (t->isintegral() || t->ty == Tpointer || t->ty == Tclass || t->ty == Taarray)
{
Logger::println("integral or pointer or interface");
llvm::ICmpInst::Predicate cmpop;