[Issue 10761] New: DMD crashes on unspecified inout matching.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 5 03:45:22 PDT 2013


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: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 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: -------


More information about the Digitalmars-d-bugs mailing list