[svn r39] * Updated to DMD 1.022 with the exception of:

Bugzilla 278: dmd.conf search path doesn't work

This fix was causing crashes for me :/ So for it's the old behaviour
This commit is contained in:
Tomas Lindquist Olsen
2007-10-09 06:21:30 +02:00
parent 3db5b9bb98
commit e251fc42b2
15 changed files with 277 additions and 114 deletions

View File

@@ -929,12 +929,19 @@ void FuncDeclaration::semantic3(Scope *sc)
* ctor consts were initialized.
*/
ScopeDsymbol *ad = toParent()->isScopeDsymbol();
assert(ad);
for (int i = 0; i < ad->members->dim; i++)
{ Dsymbol *s = (Dsymbol *)ad->members->data[i];
Dsymbol *p = toParent();
ScopeDsymbol *ad = p->isScopeDsymbol();
if (!ad)
{
error("static constructor can only be member of struct/class/module, not %s %s", p->kind(), p->toChars());
}
else
{
for (int i = 0; i < ad->members->dim; i++)
{ Dsymbol *s = (Dsymbol *)ad->members->data[i];
s->checkCtorConstInit();
s->checkCtorConstInit();
}
}
}
@@ -2249,7 +2256,7 @@ int StaticCtorDeclaration::addPostInvariant()
void StaticCtorDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
{
if (hgs->hdrgen)
{ buf->writestring("static this(){}\n");
{ buf->writestring("static this();\n");
return;
}
buf->writestring("static this()");