Mercurial > projects > ldc
comparison gen/functions.cpp @ 1251:0c8048e13867
Add forgotten null check.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 21 Apr 2009 19:17:29 +0200 |
parents | 4b0b470bb2f9 |
children | 854e86eaa022 |
comparison
equal
deleted
inserted
replaced
1250:4b0b470bb2f9 | 1251:0c8048e13867 |
---|---|
386 Logger::println("DtoResolveFunction(%s): %s", fdecl->toPrettyChars(), fdecl->loc.toChars()); | 386 Logger::println("DtoResolveFunction(%s): %s", fdecl->toPrettyChars(), fdecl->loc.toChars()); |
387 LOG_SCOPE; | 387 LOG_SCOPE; |
388 | 388 |
389 // queue declaration unless the function is abstract without body; | 389 // queue declaration unless the function is abstract without body; |
390 // bodyless functions in an abstract class are considered abstract | 390 // bodyless functions in an abstract class are considered abstract |
391 ClassDeclaration* cd = fdecl->parent->isClassDeclaration(); | 391 ClassDeclaration* cd = fdecl->isMember() ? fdecl->isMember()->isClassDeclaration() : NULL; |
392 bool isabstract = fdecl->isAbstract() || (cd && cd->isAbstract()); | 392 bool isabstract = fdecl->isAbstract() || (cd && cd->isAbstract()); |
393 if (!isabstract || fdecl->fbody) | 393 if (!isabstract || fdecl->fbody) |
394 { | 394 { |
395 DtoDeclareFunction(fdecl); | 395 DtoDeclareFunction(fdecl); |
396 } | 396 } |