[Issue 3602] ICE(tocsym.c) compiling a class, if its super class has preconditions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 15 05:16:30 PDT 2010


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


Don <clugdbug at yahoo.com.au> changed:

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


--- Comment #9 from Don <clugdbug at yahoo.com.au> 2010-09-15 05:15:58 PDT ---
PATCH: func.c, line 1658, FuncDeclaration::mergeFrequire()
----------------

    for (int i = 0; i < foverrides.dim; i++)
    {
        FuncDeclaration *fdv = (FuncDeclaration *)foverrides.data[i];
+        /* The semantic pass on the contracts of the overridden functions must
+         * be completed before code generation occurs (bug 3602).
+        */
+        if (fdv->fdrequire && fdv->fdrequire->semanticRun !=
PASSsemantic3done)
+        {
+            assert(fdv->scope);
+            fdv->semantic3(fdv->scope);
+        }
        sf = fdv->mergeFrequire(sf);
        if (fdv->fdrequire)
        {
            //printf("fdv->frequire: %s\n", fdv->frequire->toChars());

-- 
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