Mercurial > projects > ldc
comparison gen/functions.cpp @ 523:c9a606d6e641
Abstract functions may have bodies.
Fixes:
run/a/abstract_17_A,B
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 17 Aug 2008 11:39:36 +0200 |
parents | a34078905d01 |
children | 642f6fa854e5 |
comparison
equal
deleted
inserted
replaced
522:cd4eeb6cc5f6 | 523:c9a606d6e641 |
---|---|
376 fdecl->ir.declared = true; | 376 fdecl->ir.declared = true; |
377 | 377 |
378 Logger::println("DtoDeclareFunction(%s): %s", fdecl->toPrettyChars(), fdecl->loc.toChars()); | 378 Logger::println("DtoDeclareFunction(%s): %s", fdecl->toPrettyChars(), fdecl->loc.toChars()); |
379 LOG_SCOPE; | 379 LOG_SCOPE; |
380 | 380 |
381 assert(!fdecl->isAbstract()); | |
382 | |
383 // intrinsic sanity check | 381 // intrinsic sanity check |
384 if (fdecl->llvmInternal == LLVMintrinsic && fdecl->fbody) { | 382 if (fdecl->llvmInternal == LLVMintrinsic && fdecl->fbody) { |
385 error(fdecl->loc, "intrinsics cannot have function bodies"); | 383 error(fdecl->loc, "intrinsics cannot have function bodies"); |
386 fatal(); | 384 fatal(); |
387 } | 385 } |