From 62dee01d359b3c1ba055d09ba98190e1094e734e Mon Sep 17 00:00:00 2001 From: Frits van Bommel Date: Sun, 21 Jun 2009 00:12:29 +0200 Subject: [PATCH] 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. --- gen/toir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/toir.cpp b/gen/toir.cpp index be7b7d3c..0f3e246d 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -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;