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

View File

@@ -140,6 +140,9 @@ void FuncDeclaration::semantic(Scope *sc)
//printf("function storage_class = x%x\n", storage_class);
Dsymbol *parent = toParent();
if (ident == Id::ctor && !isCtorDeclaration())
error("_ctor is reserved for constructors");
if (isConst() || isAuto() || isScope())
error("functions cannot be const or auto");
@@ -2543,7 +2546,7 @@ void StaticDtorDeclaration::semantic(Scope *sc)
sa->push(s);
Expression *e = new IdentifierExp(0, id);
e = new AddAssignExp(0, e, new IntegerExp(-1));
e = new EqualExp(TOKnotequal, 0, e, new IntegerExp(1));
e = new EqualExp(TOKnotequal, 0, e, new IntegerExp(0));
s = new IfStatement(0, NULL, e, new ReturnStatement(0, NULL), NULL);
sa->push(s);
if (fbody)