www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10761] New: DMD crashes on unspecified inout matching.

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: timon.gehr gmx.ch



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: -------
Aug 05 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10761


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/dmd/pull/2455

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 07 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10761




Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/882fa1ea590aca24e03e96eceffc879071d6c702
fix Issue 10761 - DMD crashes on unspecified inout matching

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 18 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10761


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


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