mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-24 21:01:49 +01:00
[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:
19
dmd/func.c
19
dmd/func.c
@@ -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()");
|
||||
|
||||
Reference in New Issue
Block a user