mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 23:50:43 +03:00
Revert change to treat bodyless functions in abstract classes as abstract.
See DMD bug 2894.
This commit is contained in:
parent
83dda319ae
commit
8916f783b7
2 changed files with 4 additions and 7 deletions
|
@ -386,11 +386,8 @@ void DtoResolveFunction(FuncDeclaration* fdecl)
|
|||
Logger::println("DtoResolveFunction(%s): %s", fdecl->toPrettyChars(), fdecl->loc.toChars());
|
||||
LOG_SCOPE;
|
||||
|
||||
// queue declaration unless the function is abstract without body;
|
||||
// bodyless functions in an abstract class are considered abstract
|
||||
ClassDeclaration* cd = fdecl->isMember() ? fdecl->isMember()->isClassDeclaration() : NULL;
|
||||
bool isabstract = fdecl->isAbstract() || (cd && cd->isAbstract());
|
||||
if (!isabstract || fdecl->fbody)
|
||||
// queue declaration unless the function is abstract without body
|
||||
if (!fdecl->isAbstract() || fdecl->fbody)
|
||||
{
|
||||
DtoDeclareFunction(fdecl);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue