comparison gen/functions.cpp @ 1162:0424e7dfadb1

Do not skip abstract function declarations if they have a function body. Fixes abstract_17_A,B.
author Christian Kamm <kamm incasoftware de>
date Sat, 28 Mar 2009 20:25:59 +0100
parents ba9d6292572a
children 83d3b25c2213
comparison
equal deleted inserted replaced
1161:f528e55fb32f 1162:0424e7dfadb1
366 fdecl->ir.resolved = true; 366 fdecl->ir.resolved = true;
367 367
368 Logger::println("DtoResolveFunction(%s): %s", fdecl->toPrettyChars(), fdecl->loc.toChars()); 368 Logger::println("DtoResolveFunction(%s): %s", fdecl->toPrettyChars(), fdecl->loc.toChars());
369 LOG_SCOPE; 369 LOG_SCOPE;
370 370
371 // queue declaration 371 // queue declaration unless the function is abstract without body
372 if (!fdecl->isAbstract()) 372 if (!fdecl->isAbstract() || fdecl->fbody)
373 { 373 {
374 Logger::println("Ignoring declaration of abstract function %s", fdecl->toPrettyChars()); 374 Logger::println("Ignoring declaration of abstract bodyless function %s", fdecl->toPrettyChars());
375 DtoDeclareFunction(fdecl); 375 DtoDeclareFunction(fdecl);
376 } 376 }
377 } 377 }
378 378
379 ////////////////////////////////////////////////////////////////////////////////////////// 379 //////////////////////////////////////////////////////////////////////////////////////////