T[] -> T* implicit converstion still working?

Brad Roberts braddr at puremagic.com
Sun Dec 10 02:26:12 PST 2006


With dmd 0.177, shouldn't this be failing?  I'd like confirmation before 
I file the bug report:

import std.stdio;

class A {
     void print() { writefln("a"); }
}

int main() {
     A[1] a = new A[1]; a[0].print();
     A[]  b = new A[1]; b[0].print();
     A*   c = a;        c.print();
     A*   d = b;        d.print();
     return 0;
}

I expected both the c and d assignments to fail with a type mismatch?

Later,
Brad



More information about the Digitalmars-d-bugs mailing list