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

           Summary: DMD crashes on unspecified inout matching.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2013-08-05 03:45:21 PDT ---
DMD 2.063.2/head:

inout(int)* foo(inout(int)* a, inout(int)* delegate(inout(int)*) dg){
    return dg(a);
}

int b;
const(int) c;
int bar(inout(int)* a, inout(int)* delegate(inout(int)*) dg){
    return *dg(a)+*dg(&b)+*dg(&c);
}

void main(){
    immutable int a;
    // both of the following lines provoque the crash
    assert(foo(&a,(typeof(a)* x)=>x) is a);
    assert(!bar(&a,(inout(int)* x)=>x));
}

dmd: mtype.c:1894: Type* Type::substWildTo(unsigned int): Assertion `0' failed.

I don't know what the compiler is supposed to do.

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

Reply via email to