Merged DMD commit 2c0ac9336c96ece8b1edd691a6cc8a3b64f019b4:

bugzilla 3602 ICE(tocsym.c) compiling a class, if its super class has preconditions
This commit is contained in:
David Nadlinger
2011-04-22 14:45:52 +02:00
parent 8c7e196c3c
commit 85ff3e6fc0

View File

@@ -1593,6 +1593,16 @@ Statement *FuncDeclaration::mergeFrequire(Statement *sf)
for (int i = 0; i < foverrides.dim; i++)
{
FuncDeclaration *fdv = (FuncDeclaration *)foverrides.data[i];
/* The semantic pass on the contracts of the overridden functions must
* be completed before code generation occurs (bug 3602).
*/
if (fdv->fdrequire && fdv->fdrequire->semanticRun != PASSsemantic3done)
{
assert(fdv->scope);
fdv->semantic3(fdv->scope);
}
sf = fdv->mergeFrequire(sf);
if (fdv->fdrequire)
{