[Issue 5230] ICE(tocsym.c) overriding a method that has an out contract

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 22 06:46:17 PST 2010


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


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

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


--- Comment #2 from Don <clugdbug at yahoo.com.au> 2010-11-22 06:44:54 PST ---
Exactly the same fix for bug 3602 works here, applied to fensure instead of
frequire:

PATCH: func.c, mergeFensure(), line 1728


    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 and 5230).
+         */
+        if (fdv->fdensure && fdv->fdensure->semanticRun != PASSsemantic3done)
+        {
+            assert(fdv->scope);
+            fdv->semantic3(fdv->scope);
+        }

        sf = fdv->mergeFensure(sf);

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