http://d.puremagic.com/issues/show_bug.cgi?id=4869


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #4 from Don <clugd...@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: -------

Reply via email to