Comment #0 by matti.niemenmaa+dbugzilla — 2006-11-15T05:22:37Z
The comments should explain it:
class U {}
class T : U {}
void main() {
T* ptr;
T[2] sar;
T[] dar;
// all of the following should work according to the "Implicit Conversions" section of the spec
tPtr(ptr); tPtr(sar); tPtr(dar);
tDar(sar);
uPtr(ptr); uPtr(sar); uPtr(dar); // none of these work
uSar(sar); // doesn't work
uDar(sar); uDar(dar); // the first of these doesn't work
vPtr(ptr); vPtr(sar); vPtr(dar);
vDar(sar); vDar(dar); // the latter of these two works, but isn't mentioned in the spec
}
void tPtr(T*t){}
void tDar(T[]t){}
void uPtr(U*u){}
void uSar(U[2]u){}
void uDar(U[]u){}
void vPtr(void*v){}
void vDar(void[]v){}
Comment #1 by matti.niemenmaa+dbugzilla — 2006-12-03T03:48:12Z
Spec partially corrected for DMD 0.176.
The "uDar(dar)" case still isn't mentioned in the spec.