diff dmd/CaseStatement.d @ 68:ee3a9f34dc48

final bits of codegen implementation to compile Phobos
author korDen
date Tue, 24 Aug 2010 16:44:34 +0400
parents cab4c37afb89
children 2e2a5c3f943a
line wrap: on
line diff
--- a/dmd/CaseStatement.d	Mon Aug 23 21:21:05 2010 +0400
+++ b/dmd/CaseStatement.d	Tue Aug 24 16:44:34 2010 +0400
@@ -119,9 +119,12 @@
 		return this;
 	}
 	
-    int compare(Object obj)
+    int opCmp(Object obj)
 	{
-		assert(false);
+		// Sort cases so we can do an efficient lookup
+		CaseStatement cs2 = cast(CaseStatement)obj;
+
+		return exp.opCmp(cs2.exp);
 	}
 	
     bool usesEH()