[Issue 16233] New: ICE on wrong code

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 3 15:11:32 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16233

          Issue ID: 16233
           Summary: ICE on wrong code
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: andrei at erdani.com

This code (reduced from a larger codebase) causes dmd to abort with "null
this":

enum valueConvertible(T1, T2) = blah;

struct Checked(T, Hook)
{
    bool opEquals(U)(Checked!(U, Hook) rhs)
    {
        alias R = typeof(payload + rhs.payload);
        static if (valueConvertible!(T, R))
        {
        }
        return false;
    }
}

unittest
{
    Checked!(Checked!(int, void), void) x1;
}

--


More information about the Digitalmars-d-bugs mailing list