diff dmd/Type.d @ 131:206db751bd4c

dmdfe 2.037 compiles now
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Fri, 10 Sep 2010 00:27:37 +0100
parents 60bb0fe4563e
children af1bebfd96a4
line wrap: on
line diff
--- a/dmd/Type.d	Thu Sep 09 22:51:44 2010 +0100
+++ b/dmd/Type.d	Fri Sep 10 00:27:37 2010 +0100
@@ -54,6 +54,13 @@
 import dmd.TypeSlice;
 import dmd.Global;
 import dmd.StringValue;
+import dmd.TRUST;
+import dmd.TemplateDeclaration;
+import dmd.DotIdExp;
+import dmd.AggregateDeclaration;
+import dmd.DotTemplateInstanceExp;
+
+import dmd.expression.Util;
 
 import dmd.backend.Symbol;
 import dmd.backend.TYPE;
@@ -452,7 +459,7 @@
 ///}
 					goto Ldistinct;
 				}
-                const STC sc = STC.STCref | STC.STCin | STC.STCout | STC.STClazy;
+                const StorageClass sc = STC.STCref | STC.STCin | STC.STCout | STC.STClazy;
 				if ((arg1.storageClass & sc) != (arg2.storageClass & sc))
 					inoutmismatch = 1;
 				// We can add scope, but not subtract it
@@ -526,7 +533,7 @@
 
         /* Can convert safe/trusted to system
          */
-        if (t1.trust <= TRUST.TRUSTsystem && t2.trust >= TRUSTtrusted)
+        if (t1.trust <= TRUST.TRUSTsystem && t2.trust >= TRUST.TRUSTtrusted)
 			goto Lnotcovariant;
 
 		//printf("\tcovaraint: 1\n");
@@ -1422,7 +1429,7 @@
 		return t;
 	}
 	
-    Type addStorageClass(STC stc)
+    Type addStorageClass(StorageClass stc)
 	{
 		/* Just translate to MOD bits and let addMod() do the work
 		 */
@@ -1806,12 +1813,12 @@
         AggregateDeclaration sym = toDsymbol(sc).isAggregateDeclaration();
         assert(sym);
 
-        if (ident != Id.__sizeof &&
-	    ident != Id.alignof &&
-	    ident != Id.init &&
-	    ident != Id.mangleof &&
-	    ident != Id.stringof &&
-	    ident != Idoffsetof)
+        if (ident !is Id.__sizeof &&
+	    ident !is Id.alignof_ &&
+	    ident !is Id.init_ &&
+	    ident !is Id.mangleof_ &&
+	    ident !is Id.stringof_ &&
+	    ident !is Id.offsetof)
         {
 	    /* See if we should forward to the alias this.
 	     */
@@ -1832,7 +1839,7 @@
 	    {   /* Rewrite e.ident as:
 	         *	e.opDot().ident
 	         */
-	        e = build_overload(e.loc, sc, e, NULL, fd.ident);
+	        e = build_overload(e.loc, sc, e, null, fd.ident);
 	        e = new DotIdExp(e.loc, e, ident);
 	        return e.semantic(sc);
 	    }