diff dmd/StructInitializer.d @ 79:43073c7c7769

updated to 2.035 also implemented a few missing functions still crashes in Import.importAll though
author Trass3r
date Mon, 30 Aug 2010 03:57:51 +0200
parents 2e2a5c3f943a
children be2ab491772e
line wrap: on
line diff
--- a/dmd/StructInitializer.d	Sun Aug 29 14:39:08 2010 +0100
+++ b/dmd/StructInitializer.d	Mon Aug 30 03:57:51 2010 +0200
@@ -108,7 +108,7 @@
 					}
 					else
 					{
-						s = cast(Dsymbol)ad.fields.data[fieldi];
+						s = ad.fields[fieldi];
 					}
 				}
 				else
@@ -129,7 +129,7 @@
 							s.error("is not a per-instance initializable field");
 							break;
 						}
-						if (s == cast(Dsymbol)ad.fields.data[fieldi])
+						if (s == ad.fields[fieldi])
 							break;
 					}
 				}
@@ -243,8 +243,8 @@
 			for (j = 0; 1; j++)
 			{
 				assert(j < dts.dim);
-				//printf(" adfield[%d] = %s\n", j, ((VarDeclaration *)ad.fields.data[j]).toChars());
-				if (cast(VarDeclaration)ad.fields.data[j] == v)
+				//printf(" adfield[%d] = %s\n", j, ((VarDeclaration *)ad.fields[j]).toChars());
+				if (cast(VarDeclaration)ad.fields[j] == v) // TODO: check if 'is' needs to be used here
 				{
 					if (dts.data[j])
 						error(loc, "field %s of %s already initialized", v.toChars(), ad.toChars());
@@ -259,7 +259,7 @@
 		offset = 0;
 		for (j = 0; j < dts.dim; j++)
 		{
-			VarDeclaration v = cast(VarDeclaration)ad.fields.data[j];
+			VarDeclaration v = cast(VarDeclaration)ad.fields[j];
 
 			d = cast(dt_t*)dts.data[j];
 			if (!d)
@@ -284,7 +284,7 @@
 							v.type.toDt(&d);
 							break;
 						}
-						VarDeclaration v2 = cast(VarDeclaration)ad.fields.data[k];
+						VarDeclaration v2 = cast(VarDeclaration)ad.fields[k];
 
 						if (v2.offset < offset2 && dts.data[k])
 							break;			// overlap