[Issue 8436] New: ICE: Internal error: toir.c 178

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 25 07:48:32 PDT 2012


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

           Summary: ICE: Internal error: toir.c 178
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: deadalnix at gmail.com


--- Comment #0 from deadalnix <deadalnix at gmail.com> 2012-07-25 07:48:32 PDT ---
I got the issue mentionned in the title, with the following piece of code (I
didn't succeed in reducing it further).

auto dispatch(
    alias unhandled = {
    }, V, T
)(V visitor, ref T t) {
        return t;
}

class Type {
}

class BuiltinType(T) : Type {
}

Type getPromotedType(Type t2) {

    class T2Handler(T) {
        Type visit(Type t) {
            return this.dispatch!(t => new BuiltinType!T)(t);
        }
    }

    class T1Handler {
        Type visit(Type t) {
            return (t => handleBuiltinType!int)(t);
        }

        auto handleBuiltinType(T)() {
            return (new T2Handler!T).visit(t2);
        }

        Type visit() {
            return handleBuiltinType!uint;
        }
    }

    return (new T1Handler).visit;
}

I have no clue what precisely cause the error.

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