Merged DMD 1.037 frontend

This commit is contained in:
Tomas Lindquist Olsen
2008-12-13 13:15:31 +01:00
parent cabc236a79
commit 6716aecc52
12 changed files with 507 additions and 349 deletions

View File

@@ -1965,6 +1965,23 @@ int FuncDeclaration::isVirtual()
toParent()->isClassDeclaration();
}
int FuncDeclaration::isFinal()
{
ClassDeclaration *cd;
#if 0
printf("FuncDeclaration::isFinal(%s)\n", toChars());
printf("%p %d %d %d %d\n", isMember(), isStatic(), protection == PROTprivate, isCtorDeclaration(), linkage != LINKd);
printf("result is %d\n",
isMember() &&
!(isStatic() || protection == PROTprivate || protection == PROTpackage) &&
(cd = toParent()->isClassDeclaration()) != NULL &&
cd->storage_class & STCfinal);
#endif
return isMember() &&
(Declaration::isFinal() ||
((cd = toParent()->isClassDeclaration()) != NULL && cd->storage_class & STCfinal));
}
int FuncDeclaration::isAbstract()
{
return storage_class & STCabstract;
@@ -2708,10 +2725,11 @@ void UnitTestDeclaration::semantic(Scope *sc)
{
if (global.params.useUnitTests)
{
Type *tret;
type = new TypeFunction(NULL, Type::tvoid, FALSE, LINKd);
FuncDeclaration::semantic(sc);
Scope *sc2 = sc->push();
sc2->linkage = LINKd;
FuncDeclaration::semantic(sc2);
sc2->pop();
}
// We're going to need ModuleInfo even if the unit tests are not