[Issue 4869] auto return + inheritance + modules = compiler crashes(toctype.c)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 15 05:07:17 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4869
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
--- Comment #4 from Don <clugdbug at yahoo.com.au> 2010-09-15 05:06:45 PDT ---
Proper patch. The assert in comment 2 should still be added.
toobj.c line 790. ClassDeclaration::toObjFile(). Ensure each function has had
semantic3 run on it, if the return type is still unknown. (Ideally, this should
happen earlier on, but better late than never).
for (; i < vtbl.dim; i++)
{
FuncDeclaration *fd = ((Dsymbol *)vtbl.data[i])->isFuncDeclaration();
//printf("\tvtbl[%d] = %p\n", i, fd);
if (fd && (fd->fbody || !isAbstract()))
{
+ // Ensure function has a return value (Bugzilla 4869)
+ if (fd->type->ty == Tfunction && !((TypeFunction
*)fd->type)->next)
+ {
+ assert(fd->scope);
+ fd->semantic3(fd->scope);
+ }
Symbol *s = fd->toSymbol();
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list