[Issue 2533] New: compiler falls with "assertion failed" message on wrong code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 21 09:52:19 PST 2008


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

           Summary: compiler falls with "assertion failed" message on wrong
                    code
           Product: D
           Version: 2.022
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: resume755 at mail.ru


When compiling this code with option -unittest compiler crashes with report:

dmd: mtype.c:5564: virtual Expression* TypeStruct::dotExp(Scope*, Expression*,
Identifier*): Assertion `d' failed.

code:

template c()
{
    alias typeof( this ) M;

    M a( int op ) {
        return this;
    }

    M b ( int op ) {
        M res = this;
        res.a( op );
        return res;
    }
}

struct S
{
    mixin c;
    mixin c;
}
unittest
{
    alias S e;
}


-- 



More information about the Digitalmars-d-bugs mailing list