Summary: typeof tests stops compilation abruptly
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

bool endsWith(A1, A2)(A1 longer, A2 shorter)
    static if (is(typeof(longer[0 .. 0] == shorter)))
    return false;

void main()
    char[] a;
    byte[] b;
    endsWith(a, b);

Attempting to compile yields:

Error: array equality comparison type mismatch, char[] vs byte[]

There is no line number, which makes the bug particularly jarring (IMHO: if a
compilation error comes with no line number that can be used in tracking the
error, that bug should be automatically considered major.)


Reply via email to