mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Merged DMD commit 2c0ac9336c96ece8b1edd691a6cc8a3b64f019b4:
bugzilla 3602 ICE(tocsym.c) compiling a class, if its super class has preconditions
This commit is contained in:
10
dmd/func.c
10
dmd/func.c
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user