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



--- Comment #8 from Don <clugd...@yahoo.com.au> 2009-09-29 23:52:57 PDT ---
Here is a trivial patch to prevent the ICE, and turn it into a rejects-valid. 
That's probably enough for now -- the fact that it's taken years for this bug 
to be reported shows that it's pretty obscure.

func.c, FuncDeclaration::semantic3(), around line 995. 

    if (fensure || addPostInvariant())
    {   /* fensure is composed of the [out] contracts
         */
        ScopeDsymbol *sym = new ScopeDsymbol();
        sym->parent = sc2->scopesym;
        sc2 = sc2->push(sym);
+        if (!type->nextOf()) {
+         error("Postconditions are not supported if the return type is
inferred");
+         return;
+        }
        if (type->nextOf() && type->nextOf()->ty == Tvoid)
        {
        if (outId)
            error("void functions have no result");
        }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to