Possible problem with new array

bearophile bearophileHUGS at lycos.com
Thu May 1 17:50:05 PDT 2008


The following code:



void main() {

  int[1] a = [10];

  int i;

  int[] b = new int[a[i]];

}



Generates this error (DMD V.1.028):

need size of rightmost array, not type a[i]



Is this a DMD bug or an error of mine?



Thank you,

bear hugs,

bearophile


More information about the Digitalmars-d-learn mailing list