diff dmd/TypeTypeof.d @ 60:a8740d0dbea4

TypeTypeof.toCBuffer2 BinExp.semanticp bug fixed
author korDen
date Mon, 23 Aug 2010 02:48:05 +0400
parents b7d29f613539
children 2e2a5c3f943a
line wrap: on
line diff
--- a/dmd/TypeTypeof.d	Sat Aug 21 14:54:46 2010 +0400
+++ b/dmd/TypeTypeof.d	Mon Aug 23 02:48:05 2010 +0400
@@ -54,7 +54,15 @@
 	
     void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod)
 	{
-		assert(false);
+		if (mod != this.mod)
+		{	
+			toCBuffer3(buf, hgs, mod);
+			return;
+		}
+		buf.writestring("typeof(");
+		exp.toCBuffer(buf, hgs);
+		buf.writeByte(')');
+		toCBuffer2Helper(buf, hgs);
 	}
 
     Type semantic(Loc loc, Scope sc)
@@ -62,7 +70,7 @@
 		Expression e;
 		Type t;
 
-		//printf("TypeTypeof.semantic() %p\n", this);
+		//printf("TypeTypeof.semantic() %.*s\n", toChars());
 
 		//static int nest; if (++nest == 50) *(char*)0=0;