A paper about traps and programming stress

Walter Bright newshound1 at digitalmars.com
Tue Mar 16 13:09:40 PDT 2010


bearophile wrote:
> Array type-checking failures: this D version of the program doen't fail at runtime:
> 
> class A {}
> class B : A {}
> void proc(A[] x, A y) {
>     x[0] = y;
> }
> void main() {
>     B[] anArrayOfB = new B[5];
>     A a = new A();
>     proc(anArrayOfB, a);
> }


This is a potentially serious problem. Needs a bugzilla entry.



More information about the Digitalmars-d mailing list