Why is (int[int] s = int[int].init) not allowed

Andre Pany andre at s-e-a-p.de
Tue Dec 22 21:11:12 UTC 2020


Hi,

I am really confused, why is this valid:
void sample(string[string] s = string[string].init){}

while this causes syntax errors?

void sample_invalid1(double[string] s = double[string].init){}
void sample_invalid2(int[int] s = int[int].init){}

Kind regards
André


More information about the Digitalmars-d-learn mailing list