Upgraded frontend to DMD 1.035

This commit is contained in:
Tomas Lindquist Olsen
2008-10-06 16:22:11 +02:00
parent e109025c00
commit 06a55194d7
17 changed files with 130 additions and 57 deletions
+16 -4
View File
@@ -477,10 +477,22 @@ void ClassDeclaration::semantic(Scope *sc)
if (storage_class & STCstatic)
error("static class cannot inherit from nested class %s", baseClass->toChars());
if (toParent2() != baseClass->toParent2())
error("super class %s is nested within %s, not %s",
{
if (toParent2())
{
error("is nested within %s, but super class %s is nested within %s",
toParent2()->toChars(),
baseClass->toChars(),
baseClass->toParent2()->toChars(),
toParent2()->toChars());
baseClass->toParent2()->toChars());
}
else
{
error("is not nested, but super class %s is nested within %s",
baseClass->toChars(),
baseClass->toParent2()->toChars());
}
isnested = 0;
}
}
else if (!(storage_class & STCstatic))
{ Dsymbol *s = toParent2();
@@ -579,7 +591,7 @@ void ClassDeclaration::semantic(Scope *sc)
* They must be in this class, not in a base class.
*/
ctor = (CtorDeclaration *)search(0, Id::ctor, 0);
if (ctor && ctor->toParent() != this)
if (ctor && (ctor->toParent() != this || !ctor->isCtorDeclaration()))
ctor = NULL;
// dtor = (DtorDeclaration *)search(Id::dtor, 0);