diff --git a/dmd/func.c b/dmd/func.c index 7d7715e1..de793343 100644 --- a/dmd/func.c +++ b/dmd/func.c @@ -673,7 +673,9 @@ void FuncDeclaration::semantic(Scope *sc) Ldone: Module::dprogress++; - semanticRun = PASSsemanticdone; + //LDC relies on semanticRun variable not being reset here + if(semanticRun < PASSsemanticdone) + semanticRun = PASSsemanticdone; /* Save scope for possible later use (if we need the * function internals)